From 145d0064af5ceca7a2f0d244aa8d50a8f594f3d7 Mon Sep 17 00:00:00 2001
From: zf <1603559716@qq.com>
Date: 星期五, 04 八月 2023 09:42:05 +0800
Subject: [PATCH] bug修改

---
 src/main/java/com/gk/hotwork/Mapper/mybatis/SafetyInspectionItemMapper.xml |   91 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 91 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/gk/hotwork/Mapper/mybatis/SafetyInspectionItemMapper.xml b/src/main/java/com/gk/hotwork/Mapper/mybatis/SafetyInspectionItemMapper.xml
index 34481ae..d5b351d 100644
--- a/src/main/java/com/gk/hotwork/Mapper/mybatis/SafetyInspectionItemMapper.xml
+++ b/src/main/java/com/gk/hotwork/Mapper/mybatis/SafetyInspectionItemMapper.xml
@@ -12,6 +12,7 @@
 
     <result column="element_a" property="elementA" jdbcType="BIGINT" />
     <result column="element_b" property="elementB" jdbcType="BIGINT" />
+    <result column="element_c" property="elementC" jdbcType="BIGINT" />
     <result column="standardization_requirements" property="standardizationRequirements" jdbcType="VARCHAR" />
     <result column="enterprise_standard" property="enterpriseStandard" jdbcType="VARCHAR" />
     <result column="review_method" property="reviewMethod" jdbcType="VARCHAR" />
@@ -67,4 +68,94 @@
     where a.valid_flag = 1 and a.id= #{id}
   </select>
 
+    <update id="updateBatch">
+        <foreach collection="itemList" item="item" index="index" open="" close="" separator=";">
+            update safety_inspection_item
+            set
+            <trim prefix="" suffix="" suffixOverrides=",">
+                <if test="item.validFlag != null">
+                    valid_flag = #{item.validFlag},
+                </if>
+                <if test="item.createTime != null and item.createTime != '' ">
+                    create_time = #{item.createTime},
+                </if>
+                <if test="item.createBy != null and item.createBy != '' ">
+                    create_by = #{item.createBy},
+                </if>
+                <if test="item.updateTime != null and item.updateTime != '' ">
+                    update_time = #{item.updateTime},
+                </if>
+                <if test="item.updateBy != null and item.updateBy != '' ">
+                    update_by = #{item.updateBy},
+                </if>
+                <if test="item.elementA != null">
+                    element_a = #{item.elementA},
+                </if>
+                <if test="item.elementB != null">
+                    element_b = #{item.elementB},
+                </if>
+                <if test="item.elementC != null">
+                    element_c = #{item.elementC},
+                </if>
+                <if test="item.standardizationRequirements != null and item.standardizationRequirements != '' ">
+                    standardization_requirements = #{item.standardizationRequirements},
+                </if>
+                <if test="item.enterpriseStandard != null and item.enterpriseStandard != '' ">
+                    enterprise_standard = #{item.enterpriseStandard},
+                </if>
+                <if test="item.reviewMethod != null and item.reviewMethod != '' ">
+                    review_method = #{item.reviewMethod},
+                </if>
+                <if test="item.veto != null and item.veto != '' ">
+                    veto = #{item.veto},
+                </if>
+            </trim>
+            where id=#{item.id}
+        </foreach>
+
+    </update>
+    <update id="updateSafetyInspectionItem">
+        update safety_inspection_item
+        <trim prefix="set" suffix="" suffixOverrides=",">
+            <if test="item.validFlag != null">
+                valid_flag = #{item.validFlag},
+            </if>
+            <if test="item.createTime != null">
+                create_time = #{item.createTime},
+            </if>
+            <if test="item.createBy != null and item.createBy != '' ">
+                create_by = #{item.createBy},
+            </if>
+            <if test="item.updateTime != null">
+                update_time = #{item.updateTime},
+            </if>
+            <if test="item.updateBy != null and item.updateBy != '' ">
+                update_by = #{item.updateBy},
+            </if>
+            <if test="item.elementA != null">
+                element_a = #{item.elementA},
+            </if>
+            <if test="item.elementB != null">
+                element_b = #{item.elementB},
+            </if>
+            <if test="item.elementC != null">
+                element_c = #{item.elementC},
+            </if>
+            <if test="item.standardizationRequirements != null and item.standardizationRequirements != '' ">
+                standardization_requirements = #{item.standardizationRequirements},
+            </if>
+            <if test="item.enterpriseStandard != null and item.enterpriseStandard != '' ">
+                enterprise_standard = #{item.enterpriseStandard},
+            </if>
+            <if test="item.reviewMethod != null and item.reviewMethod != '' ">
+                review_method = #{item.reviewMethod},
+            </if>
+            <if test="item.veto != null and item.veto != '' ">
+                veto = #{item.veto},
+            </if>
+        </trim>
+        where id=#{item.id}
+
+    </update>
+
 </mapper>

--
Gitblit v1.9.2