PurchaseOrderRevokeLineMapper.xml
3.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lframework.xingyun.sc.mappers.PurchaseOrderRevokeLineMapper">
    <resultMap id="PurchaseOrderRevokeLine" type="com.lframework.xingyun.sc.entity.PurchaseOrderRevokeLine">
        <id column="id" property="id"/>
        <result column="purchase_order_revoke_id" property="purchaseOrderRevokeId"/>
        <result column="purchase_order_line_id" property="purchaseOrderLineId"/>
        <result column="industry" property="industry"/>
        <result column="quality" property="quality"/>
        <result column="brand" property="brand"/>
        <result column="thickness" property="thickness"/>
        <result column="thickness_tol_pos" property="thicknessTolPos"/>
        <result column="thickness_tol_neg" property="thicknessTolNeg"/>
        <result column="width" property="width"/>
        <result column="width_tol_pos" property="widthTolPos"/>
        <result column="width_tol_neg" property="widthTolNeg"/>
        <result column="length" property="length"/>
        <result column="length_tol_pos" property="lengthTolPos"/>
        <result column="length_tol_neg" property="lengthTolNeg"/>
        <result column="status" property="status"/>
        <result column="quantity" property="quantity"/>
        <result column="sales_price" property="salesPrice"/>
        <result column="delivery_date" property="deliveryDate"/>
        <result column="revoke_quantity" property="revokeQuantity"/>
        <result column="show_order" property="showOrder"/>
        <result column="create_by_id" property="createById"/>
        <result column="create_by" property="createBy"/>
        <result column="update_by_id" property="updateById"/>
        <result column="update_by" property="updateBy"/>
        <result column="create_time" property="createTime"/>
        <result column="update_time" property="updateTime"/>
    </resultMap>
    <sql id="PurchaseOrderRevokeLine_sql">
        SELECT
            tb.id,
            tb.purchase_order_revoke_id,
            tb.purchase_order_line_id,
            tb.industry,
            tb.quality,
            tb.brand,
            tb.thickness,
            tb.thickness_tol_pos,
            tb.thickness_tol_neg,
            tb.width,
            tb.width_tol_pos,
            tb.width_tol_neg,
            tb.length,
            tb.length_tol_pos,
            tb.length_tol_neg,
            tb.status,
            tb.quantity,
            tb.sales_price,
            tb.delivery_date,
            tb.revoke_quantity,
            tb.show_order,
            tb.create_by_id,
            tb.create_by,
            tb.update_by_id,
            tb.update_by,
            tb.create_time,
            tb.update_time
        FROM tbl_purchase_order_revoke_line AS tb
    </sql>
    <select id="query" resultMap="PurchaseOrderRevokeLine">
        <include refid="PurchaseOrderRevokeLine_sql"/>
        <where>
            <if test="vo.purchaseOrderRevokeId != null and vo.purchaseOrderRevokeId != ''">
                AND tb.purchase_order_revoke_id = #{vo.purchaseOrderRevokeId}
            </if>
            <if test="vo.purchaseOrderLineId != null and vo.purchaseOrderLineId != ''">
                AND tb.purchase_order_line_id = #{vo.purchaseOrderLineId}
            </if>
            <if test="vo.industry != null and vo.industry != ''">
                AND tb.industry = #{vo.industry}
            </if>
            <if test="vo.brand != null and vo.brand != ''">
                AND tb.brand = #{vo.brand}
            </if>
        </where>
        ORDER BY tb.show_order ASC
    </select>
</mapper>