-
admin
2024-05-17 68f0c8f92fb7c82dc447b9aaed2d23760c546f25
提交 | 用户 | 时间
5966d6 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.testDeviceInterface.mapper.DaTestDeviceInterfaceMapper">
6     
7     <resultMap type="DaTestDeviceInterface" id="DaTestDeviceInterfaceResult">
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="selectDaTestDeviceInterfaceVo">
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
32     </sql>
33
34     <select id="selectDaTestDeviceInterfaceList" parameterType="DaTestDeviceInterface" resultMap="DaTestDeviceInterfaceResult">
35         <include refid="selectDaTestDeviceInterfaceVo"/>
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="resultCode != null  and resultCode != ''"> and result_code = #{resultCode}</if>
44         </where>
45     </select>
46     
47     <select id="selectDaTestDeviceInterfaceById" parameterType="Long" resultMap="DaTestDeviceInterfaceResult">
48         <include refid="selectDaTestDeviceInterfaceVo"/>
49         where id = #{id}
50     </select>
51         
52     <insert id="insertDaTestDeviceInterface" parameterType="DaTestDeviceInterface">
53         insert into da_test_device_interface
54         <trim prefix="(" suffix=")" suffixOverrides=",">
55             <if test="id != null">id,</if>
56             <if test="recordId != null">record_id,</if>
57             <if test="stationCode != null">station_code,</if>
58             <if test="productNum != null">product_num,</if>
59             <if test="totalResult != null">total_result,</if>
60             <if test="workOrderNo != null">work_order_no,</if>
61             <if test="supplierType != null">supplier_type,</if>
62             <if test="checkList != null">check_list,</if>
63             <if test="resultCode != null">result_code,</if>
64             <if test="resultMessage != null">result_message,</if>
65             <if test="resultData != null">result_data,</if>
66             <if test="remarks != null">remarks,</if>
67             <if test="createUser != null">create_user,</if>
68             <if test="createTime != null">create_time,</if>
69             <if test="updateUser != null">update_user,</if>
70             <if test="updateTime != null">update_time,</if>
71             <if test="spareField1 != null">spare_field1,</if>
72             <if test="spareField2 != null">spare_field2,</if>
73             <if test="spareField3 != null">spare_field3,</if>
74             <if test="spareField4 != null">spare_field4,</if>
75          </trim>
76         <trim prefix="values (" suffix=")" suffixOverrides=",">
77             <if test="id != null">#{id},</if>
78             <if test="recordId != null">#{recordId},</if>
79             <if test="stationCode != null">#{stationCode},</if>
80             <if test="productNum != null">#{productNum},</if>
81             <if test="totalResult != null">#{totalResult},</if>
82             <if test="workOrderNo != null">#{workOrderNo},</if>
83             <if test="supplierType != null">#{supplierType},</if>
84             <if test="checkList != null">#{checkList},</if>
85             <if test="resultCode != null">#{resultCode},</if>
86             <if test="resultMessage != null">#{resultMessage},</if>
87             <if test="resultData != null">#{resultData},</if>
88             <if test="remarks != null">#{remarks},</if>
89             <if test="createUser != null">#{createUser},</if>
90             <if test="createTime != null">#{createTime},</if>
91             <if test="updateUser != null">#{updateUser},</if>
92             <if test="updateTime != null">#{updateTime},</if>
93             <if test="spareField1 != null">#{spareField1},</if>
94             <if test="spareField2 != null">#{spareField2},</if>
95             <if test="spareField3 != null">#{spareField3},</if>
96             <if test="spareField4 != null">#{spareField4},</if>
97          </trim>
98     </insert>
99
100     <update id="updateDaTestDeviceInterface" parameterType="DaTestDeviceInterface">
101         update da_test_device_interface
102         <trim prefix="SET" suffixOverrides=",">
103             <if test="recordId != null">record_id = #{recordId},</if>
104             <if test="stationCode != null">station_code = #{stationCode},</if>
105             <if test="productNum != null">product_num = #{productNum},</if>
106             <if test="totalResult != null">total_result = #{totalResult},</if>
107             <if test="workOrderNo != null">work_order_no = #{workOrderNo},</if>
108             <if test="supplierType != null">supplier_type = #{supplierType},</if>
109             <if test="checkList != null">check_list = #{checkList},</if>
110             <if test="resultCode != null">result_code = #{resultCode},</if>
111             <if test="resultMessage != null">result_message = #{resultMessage},</if>
112             <if test="resultData != null">result_data = #{resultData},</if>
113             <if test="remarks != null">remarks = #{remarks},</if>
114             <if test="createUser != null">create_user = #{createUser},</if>
115             <if test="createTime != null">create_time = #{createTime},</if>
116             <if test="updateUser != null">update_user = #{updateUser},</if>
117             <if test="updateTime != null">update_time = #{updateTime},</if>
118             <if test="spareField1 != null">spare_field1 = #{spareField1},</if>
119             <if test="spareField2 != null">spare_field2 = #{spareField2},</if>
120             <if test="spareField3 != null">spare_field3 = #{spareField3},</if>
121             <if test="spareField4 != null">spare_field4 = #{spareField4},</if>
122         </trim>
123         where id = #{id}
124     </update>
125
126     <delete id="deleteDaTestDeviceInterfaceById" parameterType="Long">
127         delete from da_test_device_interface where id = #{id}
128     </delete>
129
130     <delete id="deleteDaTestDeviceInterfaceByIds" parameterType="String">
131         delete from da_test_device_interface where id in 
132         <foreach item="id" collection="array" open="(" separator="," close=")">
133             #{id}
134         </foreach>
135     </delete>
136 </mapper>