From 4afa387b237899d5f841a3070d04739772c22551 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 30 五月 2025 11:17:47 +0800
Subject: [PATCH] 规范二维码生成
---
pms-parent/pms-global/src/main/resources/mapper/PrDeviceMapper.xml | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/pms-parent/pms-global/src/main/resources/mapper/PrDeviceMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/PrDeviceMapper.xml
index 581d229..2bd1653 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/PrDeviceMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/PrDeviceMapper.xml
@@ -32,27 +32,27 @@
delete from pr_device
where batch_id = #{batchId,jdbcType=BIGINT}
</delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrDevice" useGeneratedKeys="true">
+ <insert id="insert" parameterType="com.dy.pmsGlobal.pojoPr.PrDevice">
insert into pr_device
( id,pro_id,batch_id
,device_no,status)
values (#{id,jdbcType=BIGINT},#{proId,jdbcType=BIGINT},#{batchId,jdbcType=BIGINT}
,#{deviceNo,jdbcType=BIGINT},#{status,jdbcType=TINYINT})
</insert>
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrDevice" useGeneratedKeys="true">
+ <insert id="insertSelective" parameterType="com.dy.pmsGlobal.pojoPr.PrDevice">
insert into pr_device
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="proId != null">pro_id,</if>
<if test="batchId != null">batch_id,</if>
- <if test="deviceNo != null">device_no,</if>
+ <if test="deviceNo != null and deviceNo !=''">device_no,</if>
<if test="status != null">status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<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">#{deviceNo</if>
+ <if test="deviceNo != null and deviceNo !=''">#{deviceNo},</if>
<if test="status != null">#{status,jdbcType=TINYINT},</if>
</trim>
</insert>
@@ -78,11 +78,11 @@
<if test="batchId != null">
batch_id = #{batchId,jdbcType=BIGINT},
</if>
- <if test="deviceNo != null">
- device_no = #{deviceNo
+ <if test="deviceNo != null and deviceNo !=''">
+ device_no = #{deviceNo},
</if>
<if test="status != null">
- status = #{status,jdbcType=TINYINT},
+ status = #{status,jdbcType=TINYINT}
</if>
</set>
where id = #{id,jdbcType=BIGINT}
@@ -92,7 +92,7 @@
set
pro_id = #{proId,jdbcType=BIGINT},
batch_id = #{batchId,jdbcType=BIGINT},
- device_no = #{deviceNo
+ device_no = #{deviceNo},
status = #{status,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
@@ -111,7 +111,7 @@
<if test="batchId != null">
batch_id = #{batchId,jdbcType=BIGINT} and
</if>
- <if test="deviceNo != null">
+ <if test="deviceNo != null and deviceNo !=''">
device_no = #{deviceNo,jdbcType=BIGINT} and
</if>
<if test="status != null">
@@ -139,7 +139,7 @@
<if test="batchId != null">
batch_id = #{batchId,jdbcType=BIGINT} and
</if>
- <if test="deviceNo != null">
+ <if test="deviceNo != null and deviceNo !=''">
device_no = #{deviceNo,jdbcType=BIGINT} and
</if>
<if test="status != null">
--
Gitblit v1.8.0