cl
2024-09-06 e0391b17f64e4c79f7b1d4ffa2963772c2ebed52
提交 | 用户 | 时间
0691dd 1 <?xml version="1.0" encoding="UTF-8" ?>
A 2 <!DOCTYPE mapper
3 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5 <mapper namespace="com.jcdm.main.da.cellData.mapper.DaCellDataMapper">
6     
7     <resultMap type="DaCellData" id="DaCellDataResult">
8         <result property="id"    column="id"    />
9         <result property="serviceId"    column="service_id"    />
10         <result property="siteCode"    column="site_code"    />
11         <result property="moduleSerial"    column="module_serial"    />
12         <result property="moduleModel"    column="module_model"    />
13         <result property="ABModule"    column="ab_module"    />
14         <result property="packageNo"    column="package_no"    />
15         <result property="supplierModuleBarcode"    column="supplier_module_barcode"    />
16         <result property="customerModuleBarcode"    column="customer_module_barcode"    />
17         <result property="cellSerial"    column="cell_serial"    />
18         <result property="cellModel"    column="cell_model"    />
19         <result property="gbModuleCode"    column="gb_Module_code"    />
20         <result property="gbCellCode"    column="gb_cell_code"    />
21         <result property="cellItem"    column="cell_item"    />
22         <result property="cellValue"    column="cell_value"    />
23         <result property="createTime"    column="create_time"    />
24         <result property="createUser"    column="create_user"    />
25         <result property="spareField1"    column="spare_field1"    />
26         <result property="spareField2"    column="spare_field2"    />
27         <result property="spareField3"    column="spare_field3"    />
28         <result property="spareField4"    column="spare_field4"    />
29     </resultMap>
30
31     <sql id="selectDaCellDataVo">
32         select id, service_id, site_code, module_serial, module_model, ab_module, package_no, supplier_module_barcode, customer_module_barcode, cell_serial, cell_model, gb_Module_code, gb_cell_code, cell_item, cell_value, create_time, create_user, spare_field1, spare_field2, spare_field3, spare_field4 from da_cell_data
33     </sql>
34
35     <select id="selectDaCellDataList" parameterType="DaCellData" resultMap="DaCellDataResult">
36         <include refid="selectDaCellDataVo"/>
37         <where>  
38             <if test="serviceId != null  and serviceId != ''"> and service_id = #{serviceId}</if>
39             <if test="siteCode != null  and siteCode != ''"> and site_code = #{siteCode}</if>
40             <if test="moduleSerial != null  and moduleSerial != ''"> and module_serial = #{moduleSerial}</if>
41             <if test="moduleModel != null  and moduleModel != ''"> and module_model = #{moduleModel}</if>
42             <if test="ABModule != null  and ABModule != ''"> and ABModule = #{ABModule}</if>
43             <if test="packageNo != null  and packageNo != ''"> and package_no = #{packageNo}</if>
44             <if test="supplierModuleBarcode != null  and supplierModuleBarcode != ''"> and supplier_module_barcode = #{supplierModuleBarcode}</if>
45             <if test="customerModuleBarcode != null  and customerModuleBarcode != ''"> and customer_module_barcode = #{customerModuleBarcode}</if>
46             <if test="cellSerial != null  and cellSerial != ''"> and cell_serial = #{cellSerial}</if>
47             <if test="cellModel != null  and cellModel != ''"> and cell_model = #{cellModel}</if>
48             <if test="cellItem != null  and cellItem != ''"> and cell_item = #{cellItem}</if>
49             <if test="cellValue != null  and cellValue != ''"> and cell_value = #{cellValue}</if>
50             <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
51             <if test="spareField1 != null  and spareField1 != ''"> and spare_field1 = #{spareField1}</if>
52             <if test="spareField2 != null  and spareField2 != ''"> and spare_field2 = #{spareField2}</if>
53             <if test="spareField3 != null  and spareField3 != ''"> and spare_field3 = #{spareField3}</if>
54             <if test="spareField4 != null  and spareField4 != ''"> and spare_field4 = #{spareField4}</if>
55         </where>
56     </select>
57     
58     <select id="selectDaCellDataById" parameterType="Long" resultMap="DaCellDataResult">
59         <include refid="selectDaCellDataVo"/>
60         where id = #{id}
61     </select>
62         
63     <insert id="insertDaCellData" parameterType="DaCellData" useGeneratedKeys="true" keyProperty="id">
64         insert into da_cell_data
65         <trim prefix="(" suffix=")" suffixOverrides=",">
66             <if test="serviceId != null">service_id,</if>
67             <if test="siteCode != null">site_code,</if>
68             <if test="moduleSerial != null">module_serial,</if>
69             <if test="moduleModel != null">module_model,</if>
70             <if test="ABModule != null">ABModule,</if>
71             <if test="packageNo != null">package_no,</if>
72             <if test="supplierModuleBarcode != null">supplier_module_barcode,</if>
73             <if test="customerModuleBarcode != null">customer_module_barcode,</if>
74             <if test="cellSerial != null">cell_serial,</if>
75             <if test="cellModel != null">cell_model,</if>
76             <if test="cellItem != null">cell_item,</if>
77             <if test="cellValue != null">cell_value,</if>
78             <if test="createTime != null">create_time,</if>
79             <if test="createUser != null">create_user,</if>
80             <if test="spareField1 != null">spare_field1,</if>
81             <if test="spareField2 != null">spare_field2,</if>
82             <if test="spareField3 != null">spare_field3,</if>
83             <if test="spareField4 != null">spare_field4,</if>
84          </trim>
85         <trim prefix="values (" suffix=")" suffixOverrides=",">
86             <if test="serviceId != null">#{serviceId},</if>
87             <if test="siteCode != null">#{siteCode},</if>
88             <if test="moduleSerial != null">#{moduleSerial},</if>
89             <if test="moduleModel != null">#{moduleModel},</if>
90             <if test="ABModule != null">#{ABModule},</if>
91             <if test="packageNo != null">#{packageNo},</if>
92             <if test="supplierModuleBarcode != null">#{supplierModuleBarcode},</if>
93             <if test="customerModuleBarcode != null">#{customerModuleBarcode},</if>
94             <if test="cellSerial != null">#{cellSerial},</if>
95             <if test="cellModel != null">#{cellModel},</if>
96             <if test="cellItem != null">#{cellItem},</if>
97             <if test="cellValue != null">#{cellValue},</if>
98             <if test="createTime != null">#{createTime},</if>
99             <if test="createUser != null">#{createUser},</if>
100             <if test="spareField1 != null">#{spareField1},</if>
101             <if test="spareField2 != null">#{spareField2},</if>
102             <if test="spareField3 != null">#{spareField3},</if>
103             <if test="spareField4 != null">#{spareField4},</if>
104          </trim>
105     </insert>
106
107     <update id="updateDaCellData" parameterType="DaCellData">
108         update da_cell_data
109         <trim prefix="SET" suffixOverrides=",">
110             <if test="serviceId != null">service_id = #{serviceId},</if>
111             <if test="siteCode != null">site_code = #{siteCode},</if>
112             <if test="moduleSerial != null">module_serial = #{moduleSerial},</if>
113             <if test="moduleModel != null">module_model = #{moduleModel},</if>
114             <if test="ABModule != null">ABModule = #{ABModule},</if>
115             <if test="packageNo != null">package_no = #{packageNo},</if>
116             <if test="supplierModuleBarcode != null">supplier_module_barcode = #{supplierModuleBarcode},</if>
117             <if test="customerModuleBarcode != null">customer_module_barcode = #{customerModuleBarcode},</if>
118             <if test="cellSerial != null">cell_serial = #{cellSerial},</if>
119             <if test="cellModel != null">cell_model = #{cellModel},</if>
120             <if test="cellItem != null">cell_item = #{cellItem},</if>
121             <if test="cellValue != null">cell_value = #{cellValue},</if>
122             <if test="createTime != null">create_time = #{createTime},</if>
123             <if test="createUser != null">create_user = #{createUser},</if>
124             <if test="spareField1 != null">spare_field1 = #{spareField1},</if>
125             <if test="spareField2 != null">spare_field2 = #{spareField2},</if>
126             <if test="spareField3 != null">spare_field3 = #{spareField3},</if>
127             <if test="spareField4 != null">spare_field4 = #{spareField4},</if>
128         </trim>
129         where id = #{id}
130     </update>
131
132     <delete id="deleteDaCellDataById" parameterType="Long">
133         delete from da_cell_data where id = #{id}
134     </delete>
135
136     <delete id="deleteDaCellDataByIds" parameterType="String">
137         delete from da_cell_data where id in 
138         <foreach item="id" collection="array" open="(" separator="," close=")">
139             #{id}
140         </foreach>
141     </delete>
ddf2c2 142
C 143     <delete id="deleteDaCellDataByGbCellCode" parameterType="String">
144         DELETE
145         FROM
146             da_cell_data
147         WHERE
148             gb_cell_code = #{gbCellCode}
149     </delete>
e1a98f 150
C 151     <delete id="deleteDaCellDataByCellSerial" parameterType="String">
152         DELETE
153         FROM
154             da_cell_data
155         WHERE
156             cell_serial = #{cellSerial}
157     </delete>
0691dd 158 </mapper>