From 591e3b8a10ed15023f3ad9e5a72a887ef89b0bb2 Mon Sep 17 00:00:00 2001
From: 刘小明 <liuxm_a@163.com>
Date: 星期一, 26 八月 2024 20:47:46 +0800
Subject: [PATCH] 修改判空方式

---
 pms-parent/pms-global/src/main/resources/mapper/PltProParamsMapper.xml |   34 ++++++++++++++++++++--------------
 1 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/pms-parent/pms-global/src/main/resources/mapper/PltProParamsMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/PltProParamsMapper.xml
index 0f9eae0..11e2819 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/PltProParamsMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/PltProParamsMapper.xml
@@ -21,6 +21,12 @@
     from plt_product_params
     where id = #{id,jdbcType=BIGINT}
   </select>
+  <select id="selectParams"  parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from plt_product_params
+    where pro_id = #{proId,jdbcType=BIGINT} and deleted !=1
+  </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
     <!--@mbg.generated-->
     delete from plt_product_params
@@ -39,36 +45,36 @@
     <!--@mbg.generated-->
     insert into plt_product_params
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
+      <if test="id != null and id !=''">
         id,
       </if>
-      <if test="proId != null">
+      <if test="proId != null and proId !=''">
         pro_id,
       </if>
-      <if test="paramName != null">
+      <if test="paramName!= null and paramName !=''">
         param_name,
       </if>
-      <if test="paramValue != null">
+      <if test="paramValue!= null and paramValue !=''">
         param_value,
       </if>
-      <if test="deleted != null">
+      <if test="deleted != null and deleted !=''">
         deleted
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
+      <if test="id != null and id !=''">
         #{id,jdbcType=BIGINT},
       </if>
-      <if test="proId != null">
+      <if test="proId != null and proId !=''">
         #{proId,jdbcType=BIGINT},
       </if>
-      <if test="paramName != null">
+      <if test="paramName!= null and paramName !=''">
         #{paramName,jdbcType=VARCHAR},
       </if>
-      <if test="paramValue != null">
+      <if test="paramValue!= null and paramValue !=''">
         #{paramValue,jdbcType=VARCHAR},
       </if>
-      <if test="deleted != null">
+      <if test="deleted != null and deleted !=''">
         #{deleted,jdbcType=TINYINT}
       </if>
     </trim>
@@ -77,16 +83,16 @@
     <!--@mbg.generated-->
     update plt_product_params
     <set>
-      <if test="proId != null">
+      <if test="proId != null and proId !=''">
         pro_id = #{proId,jdbcType=BIGINT},
       </if>
-      <if test="paramName != null">
+      <if test="paramName!= null and paramName !=''">
         param_name = #{paramName,jdbcType=VARCHAR},
       </if>
-      <if test="paramValue != null">
+      <if test="paramValue!= null and paramValue !=''">
         param_value = #{paramValue,jdbcType=VARCHAR},
       </if>
-      <if test="deleted != null">
+      <if test="deleted != null and deleted !=''">
         deleted = #{deleted,jdbcType=TINYINT}
       </if>
     </set>

--
Gitblit v1.8.0