From f14c50cb0036d3ddd655ce4e34732ba396a836c4 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期二, 30 五月 2023 12:42:03 +0800
Subject: [PATCH] optimize 统计

---
 java110-db/src/main/resources/mapper/community/CommunitySpacePersonTimeV1ServiceDaoImplMapper.xml |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/community/CommunitySpacePersonTimeV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/CommunitySpacePersonTimeV1ServiceDaoImplMapper.xml
index d9a178c..172fd6a 100644
--- a/java110-db/src/main/resources/mapper/community/CommunitySpacePersonTimeV1ServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/CommunitySpacePersonTimeV1ServiceDaoImplMapper.xml
@@ -37,6 +37,12 @@
                 #{item}
             </foreach>
         </if>
+        <if test="states !=null ">
+            and t.state in
+            <foreach collection="states" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
         <if test="hours !=null and hours != ''">
             and t.hours= #{hours}
         </if>
@@ -69,9 +75,7 @@
         <if test="spaceId !=null and spaceId != ''">
             , t.space_id= #{spaceId}
         </if>
-        <if test="cspId !=null and cspId != ''">
-            , t.csp_id= #{cspId}
-        </if>
+
         <if test="state !=null and state != ''">
             , t.state = #{state}
         </if>
@@ -85,6 +89,9 @@
         <if test="timeId !=null and timeId != ''">
             and t.time_id= #{timeId}
         </if>
+        <if test="cspId !=null and cspId != ''">
+            and t.csp_id= #{cspId}
+        </if>
 
     </update>
 

--
Gitblit v1.8.0