admin
2024-07-04 d8e6a522964374f72fab85a3f53fc7a8ffa56e04
提交 | 用户 | 时间
475e40 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.testDeviceInterfaceTemp.mapper.DaTestDeviceInterfaceTempMapper">
6     
7     <resultMap type="DaTestDeviceInterfaceTemp" id="DaTestDeviceInterfaceTempResult">
8         <result property="id"    column="id"    />
9         <result property="recordId"    column="record_id"    />
10         <result property="stationCode"    column="station_code"    />
11         <result property="productNum"    column="product_num"    />
12         <result property="totalResult"    column="total_result"    />
13         <result property="workOrderNo"    column="work_order_no"    />
14         <result property="supplierType"    column="supplier_type"    />
15         <result property="checkList"    column="check_list"    />
16         <result property="resultCode"    column="result_code"    />
17         <result property="resultMessage"    column="result_message"    />
18         <result property="resultData"    column="result_data"    />
19         <result property="remarks"    column="remarks"    />
20         <result property="createUser"    column="create_user"    />
21         <result property="createTime"    column="create_time"    />
22         <result property="updateUser"    column="update_user"    />
23         <result property="updateTime"    column="update_time"    />
24         <result property="spareField1"    column="spare_field1"    />
25         <result property="spareField2"    column="spare_field2"    />
26         <result property="spareField3"    column="spare_field3"    />
27         <result property="spareField4"    column="spare_field4"    />
28     </resultMap>
29
30     <sql id="selectDaTestDeviceInterfaceTempVo">
31         select id, record_id, station_code, product_num, total_result, work_order_no, supplier_type, check_list, result_code, result_message, result_data, remarks, create_user, create_time, update_user, update_time, spare_field1, spare_field2, spare_field3, spare_field4 from da_test_device_interface_temp
32     </sql>
33
34     <select id="selectDaTestDeviceInterfaceTempList" parameterType="DaTestDeviceInterfaceTemp" resultMap="DaTestDeviceInterfaceTempResult">
35         <include refid="selectDaTestDeviceInterfaceTempVo"/>
36         <where>  
37             <if test="recordId != null  and recordId != ''"> and record_id = #{recordId}</if>
38             <if test="stationCode != null  and stationCode != ''"> and station_code = #{stationCode}</if>
39             <if test="productNum != null  and productNum != ''"> and product_num = #{productNum}</if>
40             <if test="totalResult != null  and totalResult != ''"> and total_result = #{totalResult}</if>
41             <if test="workOrderNo != null  and workOrderNo != ''"> and work_order_no = #{workOrderNo}</if>
42             <if test="supplierType != null  and supplierType != ''"> and supplier_type = #{supplierType}</if>
43             <if test="checkList != null  and checkList != ''"> and check_list = #{checkList}</if>
44             <if test="resultCode != null  and resultCode != ''"> and result_code = #{resultCode}</if>
45             <if test="resultMessage != null  and resultMessage != ''"> and result_message = #{resultMessage}</if>
46             <if test="resultData != null  and resultData != ''"> and result_data = #{resultData}</if>
47             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
48             <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
49             <if test="updateUser != null  and updateUser != ''"> and update_user = #{updateUser}</if>
50             <if test="spareField1 != null  and spareField1 != ''"> and spare_field1 = #{spareField1}</if>
51             <if test="spareField2 != null  and spareField2 != ''"> and spare_field2 = #{spareField2}</if>
52             <if test="spareField3 != null  and spareField3 != ''"> and spare_field3 = #{spareField3}</if>
53             <if test="spareField4 != null  and spareField4 != ''"> and spare_field4 = #{spareField4}</if>
54         </where>
55     </select>
56     
57     <select id="selectDaTestDeviceInterfaceTempById" parameterType="Long" resultMap="DaTestDeviceInterfaceTempResult">
58         <include refid="selectDaTestDeviceInterfaceTempVo"/>
59         where id = #{id}
60     </select>
61         
62     <insert id="insertDaTestDeviceInterfaceTemp" parameterType="DaTestDeviceInterfaceTemp" useGeneratedKeys="true" keyProperty="id">
63         insert into da_test_device_interface_temp
64         <trim prefix="(" suffix=")" suffixOverrides=",">
65             <if test="recordId != null">record_id,</if>
66             <if test="stationCode != null">station_code,</if>
67             <if test="productNum != null">product_num,</if>
68             <if test="totalResult != null">total_result,</if>
69             <if test="workOrderNo != null">work_order_no,</if>
70             <if test="supplierType != null">supplier_type,</if>
71             <if test="checkList != null">check_list,</if>
72             <if test="resultCode != null">result_code,</if>
73             <if test="resultMessage != null">result_message,</if>
74             <if test="resultData != null">result_data,</if>
75             <if test="remarks != null">remarks,</if>
76             <if test="createUser != null">create_user,</if>
77             <if test="createTime != null">create_time,</if>
78             <if test="updateUser != null">update_user,</if>
79             <if test="updateTime != null">update_time,</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="recordId != null">#{recordId},</if>
87             <if test="stationCode != null">#{stationCode},</if>
88             <if test="productNum != null">#{productNum},</if>
89             <if test="totalResult != null">#{totalResult},</if>
90             <if test="workOrderNo != null">#{workOrderNo},</if>
91             <if test="supplierType != null">#{supplierType},</if>
92             <if test="checkList != null">#{checkList},</if>
93             <if test="resultCode != null">#{resultCode},</if>
94             <if test="resultMessage != null">#{resultMessage},</if>
95             <if test="resultData != null">#{resultData},</if>
96             <if test="remarks != null">#{remarks},</if>
97             <if test="createUser != null">#{createUser},</if>
98             <if test="createTime != null">#{createTime},</if>
99             <if test="updateUser != null">#{updateUser},</if>
100             <if test="updateTime != null">#{updateTime},</if>
101             <if test="spareField1 != null">#{spareField1},</if>
102             <if test="spareField2 != null">#{spareField2},</if>
103             <if test="spareField3 != null">#{spareField3},</if>
104             <if test="spareField4 != null">#{spareField4},</if>
105          </trim>
106     </insert>
107
108     <update id="updateDaTestDeviceInterfaceTemp" parameterType="DaTestDeviceInterfaceTemp">
109         update da_test_device_interface_temp
110         <trim prefix="SET" suffixOverrides=",">
111             <if test="recordId != null">record_id = #{recordId},</if>
112             <if test="stationCode != null">station_code = #{stationCode},</if>
113             <if test="productNum != null">product_num = #{productNum},</if>
114             <if test="totalResult != null">total_result = #{totalResult},</if>
115             <if test="workOrderNo != null">work_order_no = #{workOrderNo},</if>
116             <if test="supplierType != null">supplier_type = #{supplierType},</if>
117             <if test="checkList != null">check_list = #{checkList},</if>
118             <if test="resultCode != null">result_code = #{resultCode},</if>
119             <if test="resultMessage != null">result_message = #{resultMessage},</if>
120             <if test="resultData != null">result_data = #{resultData},</if>
121             <if test="remarks != null">remarks = #{remarks},</if>
122             <if test="createUser != null">create_user = #{createUser},</if>
123             <if test="createTime != null">create_time = #{createTime},</if>
124             <if test="updateUser != null">update_user = #{updateUser},</if>
125             <if test="updateTime != null">update_time = #{updateTime},</if>
126             <if test="spareField1 != null">spare_field1 = #{spareField1},</if>
127             <if test="spareField2 != null">spare_field2 = #{spareField2},</if>
128             <if test="spareField3 != null">spare_field3 = #{spareField3},</if>
129             <if test="spareField4 != null">spare_field4 = #{spareField4},</if>
130         </trim>
131         where id = #{id}
132     </update>
133
134     <delete id="deleteDaTestDeviceInterfaceTempById" parameterType="Long">
135         delete from da_test_device_interface_temp where id = #{id}
136     </delete>
137
138     <delete id="deleteDaTestDeviceInterfaceTempByIds" parameterType="String">
139         delete from da_test_device_interface_temp where id in 
140         <foreach item="id" collection="array" open="(" separator="," close=")">
141             #{id}
142         </foreach>
143     </delete>
d8e6a5 144
A 145     <delete id="deleteDaTestDeviceInterfaceTempByProductNum" parameterType="String">
146         DELETE
147         FROM
148             da_test_device_interface_temp
149         WHERE
150             product_num = #{cellCode}
151     </delete>
475e40 152 </mapper>