<?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.jcdm.main.da.testDeviceInterface.mapper.DaTestDeviceInterfaceMapper">
|
|
<resultMap type="DaTestDeviceInterface" id="DaTestDeviceInterfaceResult">
|
<result property="id" column="id" />
|
<result property="recordId" column="record_id" />
|
<result property="stationCode" column="station_code" />
|
<result property="productNum" column="product_num" />
|
<result property="totalResult" column="total_result" />
|
<result property="workOrderNo" column="work_order_no" />
|
<result property="supplierType" column="supplier_type" />
|
<result property="checkList" column="check_list" />
|
<result property="resultCode" column="result_code" />
|
<result property="resultMessage" column="result_message" />
|
<result property="resultData" column="result_data" />
|
<result property="remarks" column="remarks" />
|
<result property="createUser" column="create_user" />
|
<result property="createTime" column="create_time" />
|
<result property="updateUser" column="update_user" />
|
<result property="updateTime" column="update_time" />
|
<result property="spareField1" column="spare_field1" />
|
<result property="spareField2" column="spare_field2" />
|
<result property="spareField3" column="spare_field3" />
|
<result property="spareField4" column="spare_field4" />
|
</resultMap>
|
|
<sql id="selectDaTestDeviceInterfaceVo">
|
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
|
</sql>
|
|
<select id="selectDaTestDeviceInterfaceList" parameterType="DaTestDeviceInterface" resultMap="DaTestDeviceInterfaceResult">
|
<include refid="selectDaTestDeviceInterfaceVo"/>
|
<where>
|
<if test="recordId != null and recordId != ''"> and record_id = #{recordId}</if>
|
<if test="stationCode != null and stationCode != ''"> and station_code = #{stationCode}</if>
|
<if test="productNum != null and productNum != ''"> and product_num = #{productNum}</if>
|
<if test="totalResult != null and totalResult != ''"> and total_result = #{totalResult}</if>
|
<if test="workOrderNo != null and workOrderNo != ''"> and work_order_no = #{workOrderNo}</if>
|
<if test="supplierType != null and supplierType != ''"> and supplier_type = #{supplierType}</if>
|
<if test="resultCode != null and resultCode != ''"> and result_code = #{resultCode}</if>
|
</where>
|
</select>
|
|
<select id="selectDaTestDeviceInterfaceById" parameterType="Long" resultMap="DaTestDeviceInterfaceResult">
|
<include refid="selectDaTestDeviceInterfaceVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertDaTestDeviceInterface" parameterType="DaTestDeviceInterface">
|
insert into da_test_device_interface
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="recordId != null">record_id,</if>
|
<if test="stationCode != null">station_code,</if>
|
<if test="productNum != null">product_num,</if>
|
<if test="totalResult != null">total_result,</if>
|
<if test="workOrderNo != null">work_order_no,</if>
|
<if test="supplierType != null">supplier_type,</if>
|
<if test="checkList != null">check_list,</if>
|
<if test="resultCode != null">result_code,</if>
|
<if test="resultMessage != null">result_message,</if>
|
<if test="resultData != null">result_data,</if>
|
<if test="remarks != null">remarks,</if>
|
<if test="createUser != null">create_user,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="updateUser != null">update_user,</if>
|
<if test="updateTime != null">update_time,</if>
|
<if test="spareField1 != null">spare_field1,</if>
|
<if test="spareField2 != null">spare_field2,</if>
|
<if test="spareField3 != null">spare_field3,</if>
|
<if test="spareField4 != null">spare_field4,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id},</if>
|
<if test="recordId != null">#{recordId},</if>
|
<if test="stationCode != null">#{stationCode},</if>
|
<if test="productNum != null">#{productNum},</if>
|
<if test="totalResult != null">#{totalResult},</if>
|
<if test="workOrderNo != null">#{workOrderNo},</if>
|
<if test="supplierType != null">#{supplierType},</if>
|
<if test="checkList != null">#{checkList},</if>
|
<if test="resultCode != null">#{resultCode},</if>
|
<if test="resultMessage != null">#{resultMessage},</if>
|
<if test="resultData != null">#{resultData},</if>
|
<if test="remarks != null">#{remarks},</if>
|
<if test="createUser != null">#{createUser},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="updateUser != null">#{updateUser},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="spareField1 != null">#{spareField1},</if>
|
<if test="spareField2 != null">#{spareField2},</if>
|
<if test="spareField3 != null">#{spareField3},</if>
|
<if test="spareField4 != null">#{spareField4},</if>
|
</trim>
|
</insert>
|
|
<update id="updateDaTestDeviceInterface" parameterType="DaTestDeviceInterface">
|
update da_test_device_interface
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="recordId != null">record_id = #{recordId},</if>
|
<if test="stationCode != null">station_code = #{stationCode},</if>
|
<if test="productNum != null">product_num = #{productNum},</if>
|
<if test="totalResult != null">total_result = #{totalResult},</if>
|
<if test="workOrderNo != null">work_order_no = #{workOrderNo},</if>
|
<if test="supplierType != null">supplier_type = #{supplierType},</if>
|
<if test="checkList != null">check_list = #{checkList},</if>
|
<if test="resultCode != null">result_code = #{resultCode},</if>
|
<if test="resultMessage != null">result_message = #{resultMessage},</if>
|
<if test="resultData != null">result_data = #{resultData},</if>
|
<if test="remarks != null">remarks = #{remarks},</if>
|
<if test="createUser != null">create_user = #{createUser},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="updateUser != null">update_user = #{updateUser},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="spareField1 != null">spare_field1 = #{spareField1},</if>
|
<if test="spareField2 != null">spare_field2 = #{spareField2},</if>
|
<if test="spareField3 != null">spare_field3 = #{spareField3},</if>
|
<if test="spareField4 != null">spare_field4 = #{spareField4},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteDaTestDeviceInterfaceById" parameterType="Long">
|
delete from da_test_device_interface where id = #{id}
|
</delete>
|
|
<delete id="deleteDaTestDeviceInterfaceByIds" parameterType="String">
|
delete from da_test_device_interface where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|