|
@@ -1,6 +1,51 @@
|
|
|
<?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.iamberry.rst.service.pts.mapper.MachineMapper">
|
|
|
+ <insert id="addMachine" parameterType="PtsMachine" useGeneratedKeys="true" keyProperty="machineId">
|
|
|
+ INSERT INTO tb_rst_pts_machine
|
|
|
+ (machine_qrcode,machine_barcode,machine_sales_state,
|
|
|
+ machine_status,machine_produced_time,machine_is_print,
|
|
|
+ machine_compound_img,machine_process_state,machine_create_time)
|
|
|
+ VALUES
|
|
|
+ (#{machineQrcode},#{machineBarcode},2,#{machineStatus},
|
|
|
+ #{machineProducedTime},#{machineIsPrint},#{machineCompoundImg},#{machineProcessState},
|
|
|
+ #{machineCreateTime})
|
|
|
+ </insert>
|
|
|
|
|
|
-
|
|
|
+ <update id="updateMachine" parameterType="PtsMachine" >
|
|
|
+ UPDATE tb_rst_pts_machine
|
|
|
+ SET
|
|
|
+ <if test="machineSalesDate != null and machineSalesDate != ''" >
|
|
|
+ machine_sales_date = #{machineSalesDate},
|
|
|
+ </if>
|
|
|
+ <if test="machineSalesState != null and machineSalesState != ''" >
|
|
|
+ machine_sales_state = #{machineSalesState},
|
|
|
+ </if>
|
|
|
+ <if test="machineStatus != null and machineStatus != ''" >
|
|
|
+ machine_status = #{machineStatus},
|
|
|
+ </if>
|
|
|
+ <if test="machineIsPrint != null and machineIsPrint != ''" >
|
|
|
+ machine_is_print = #{machineIsPrint},
|
|
|
+ </if>
|
|
|
+ <if test="machineCompoundImg != null and machineCompoundImg != ''" >
|
|
|
+ machine_compound_img = #{machineCompoundImg},
|
|
|
+ </if>
|
|
|
+ <if test="machineProcessState != null and machineCompoundImg != ''" >
|
|
|
+ machine_process_state = #{machineProcessState},
|
|
|
+ </if>
|
|
|
+ <if test="machineSoftwareVersion != null and machineSoftwareVersion != ''" >
|
|
|
+ machine_software_version = #{machineSoftwareVersion},
|
|
|
+ </if>
|
|
|
+ <if test="machineHardwareVersion != null and machineHardwareVersion != ''" >
|
|
|
+ machine_hardware_version = #{machineHardwareVersion},
|
|
|
+ </if>
|
|
|
+ <if test="machineUpdateTime != null and machineUpdateTime != ''" >
|
|
|
+ machine_update_time = #{machineUpdateTime}
|
|
|
+ </if>
|
|
|
+ <where>
|
|
|
+ <if test="machineId != null">
|
|
|
+ machine_id = #{machineId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </update>
|
|
|
</mapper>
|