刘小明
2024-08-27 53a365fb64b49ee85f528341c785c4beab1d1f43
pms-parent/pms-global/src/main/resources/mapper/PrDeviceMapper.xml
@@ -42,18 +42,18 @@
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrDevice" useGeneratedKeys="true">
        insert into pr_device
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null and id !=''">id,</if>
                <if test="proId != null and proId !=''">pro_id,</if>
                <if test="batchId != null and batchId !=''">batch_id,</if>
                <if test="id != null">id,</if>
                <if test="proId != null">pro_id,</if>
                <if test="batchId != null">batch_id,</if>
                <if test="deviceNo != null and deviceNo !=''">device_no,</if>
                <if test="status != null and status !=''">status,</if>
                <if test="status != null">status,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null and id !=''">#{id,jdbcType=BIGINT},</if>
                <if test="proId != null and proId !=''">#{proId,jdbcType=BIGINT},</if>
                <if test="batchId != null and batchId !=''">#{batchId,jdbcType=BIGINT},</if>
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="proId != null">#{proId,jdbcType=BIGINT},</if>
                <if test="batchId != null">#{batchId,jdbcType=BIGINT},</if>
                <if test="deviceNo != null and deviceNo !=''">#{deviceNo},</if>
                <if test="status != null and status !=''">#{status,jdbcType=TINYINT},</if>
                <if test="status != null">#{status,jdbcType=TINYINT},</if>
        </trim>
    </insert>
    <insert id="insertBatch" parameterType="java.util.List">
@@ -72,16 +72,16 @@
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrDevice">
        update pr_device
        <set>
                <if test="proId != null and proId !=''">
                <if test="proId != null">
                    pro_id = #{proId,jdbcType=BIGINT},
                </if>
                <if test="batchId != null and batchId !=''">
                <if test="batchId != null">
                    batch_id = #{batchId,jdbcType=BIGINT},
                </if>
                <if test="deviceNo != null and deviceNo !=''">
                    device_no = #{deviceNo},
                </if>
                <if test="status != null and status !=''">
                <if test="status != null">
                    status = #{status,jdbcType=TINYINT}
                </if>
        </set>
@@ -102,19 +102,19 @@
        <include refid="Base_Column_List" />
        from pr_device
        <trim prefix="where" suffixOverrides="and">
                <if test="id != null and id !=''">
                <if test="id != null">
                    id = #{id,jdbcType=BIGINT} and
                </if>
                <if test="proId != null and proId !=''">
                <if test="proId != null">
                    pro_id = #{proId,jdbcType=BIGINT} and
                </if>
                <if test="batchId != null and batchId !=''">
                <if test="batchId != null">
                    batch_id = #{batchId,jdbcType=BIGINT} and
                </if>
                <if test="deviceNo != null and deviceNo !=''">
                    device_no = #{deviceNo,jdbcType=BIGINT} and
                </if>
                <if test="status != null and status !=''">
                <if test="status != null">
                    status = #{status,jdbcType=TINYINT} and
                </if>
        </trim>
@@ -130,19 +130,19 @@
        select count(1)
        from pr_device
        <trim prefix="where" suffixOverrides="and">
                <if test="id != null and id !=''">
                <if test="id != null">
                    id = #{id,jdbcType=BIGINT} and
                </if>
                <if test="proId != null and proId !=''">
                <if test="proId != null">
                    pro_id = #{proId,jdbcType=BIGINT} and
                </if>
                <if test="batchId != null and batchId !=''">
                <if test="batchId != null">
                    batch_id = #{batchId,jdbcType=BIGINT} and
                </if>
                <if test="deviceNo != null and deviceNo !=''">
                    device_no = #{deviceNo,jdbcType=BIGINT} and
                </if>
                <if test="status != null and status !=''">
                <if test="status != null">
                    status = #{status,jdbcType=TINYINT} and
                </if>
        </trim>