From 59f36e2501b2a4713a0cdf118e4736de77003511 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期三, 25 八月 2021 11:32:12 +0800
Subject: [PATCH] 优化代码

---
 java110-db/src/main/resources/mapper/oa/OaWorkflowFormServiceDaoImplMapper.xml |   28 ++++++++++++++++++++++++----
 1 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/oa/OaWorkflowFormServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/oa/OaWorkflowFormServiceDaoImplMapper.xml
index 915cbb6..f33f66b 100644
--- a/java110-db/src/main/resources/mapper/oa/OaWorkflowFormServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/oa/OaWorkflowFormServiceDaoImplMapper.xml
@@ -73,7 +73,7 @@
             , t.table_name= #{tableName}
         </if>
         where 1=1
-            and t.form_id= #{formId}
+        and t.form_id= #{formId}
 
     </update>
 
@@ -117,14 +117,13 @@
     </update>
 
 
-
     <!-- 鏌ヨOA琛ㄥ崟鏁伴噺 add by wuxw 2018-07-03 -->
     <select id="queryOaWorkflowFormDataCount" parameterType="Map" resultType="Map">
         select count(1) count
         from ${tableName} t
         where 1 =1
-            and t.store_id = #{storeId}
-            and t.status_cd= '0'
+        and t.store_id = #{storeId}
+        and t.status_cd= '0'
         <if test="startTime !=null and startTime != ''">
             and t.create_time &gt; #{startTime}
         </if>
@@ -155,6 +154,12 @@
         <if test="id !=null and id != ''">
             and t.id = #{id}
         </if>
+        <if test="ids != null">
+            and t.id in
+            <foreach collection="ids" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
         <if test="createUserName !=null and createUserName != ''">
             and t.create_user_name = #{createUserName}
         </if>
@@ -164,4 +169,19 @@
         </if>
     </select>
 
+    <!-- 淇濆瓨琛ㄥ崟鏁版嵁 -->
+    <insert id="saveOaWorkflowFormDataInfo" parameterType="Map">
+        insert into ${tableName} (
+        <foreach collection="columns" item="item" separator=",">
+            ${item}
+        </foreach>
+        id,create_user_id,create_user_name,state
+        )values(
+        <foreach collection="values" item="valueItem" separator=",">
+            #{valueItem}
+        </foreach>,
+        #{id},#{state},#{createUserId},#{createUserName}
+        )
+    </insert>
+
 </mapper>

--
Gitblit v1.8.0