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/CommunitySpaceOpenTimeV1ServiceDaoImplMapper.xml | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/community/CommunitySpaceOpenTimeV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/CommunitySpaceOpenTimeV1ServiceDaoImplMapper.xml
index 19be5e6..241a92a 100644
--- a/java110-db/src/main/resources/mapper/community/CommunitySpaceOpenTimeV1ServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/CommunitySpaceOpenTimeV1ServiceDaoImplMapper.xml
@@ -31,6 +31,7 @@
select t.space_id,t.space_id spaceId,t.hours,t.is_open,t.is_open isOpen,t.time_id,t.time_id
timeId,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId
from community_space_open_time t
+ left join community_space cs on t.space_id = cs.space_id and cs.status_cd = '0'
<if test="appointmentTime !=null and appointmentTime != ''">
left join community_space_person_time cspt on t.space_id = cspt.space_id and cspt.status_cd = '0' and cspt.hours = t.hours
left join community_space_person csp on cspt.csp_id = csp.csp_id and csp.status_cd = '0' and csp.appointment_time = #{appointmentTime}
@@ -42,6 +43,9 @@
<if test="spaceId !=null and spaceId != ''">
and t.space_id= #{spaceId}
</if>
+ <if test="venueId !=null and venueId != ''">
+ and cs.venue_id= #{venueId}
+ </if>
<if test="hours !=null and hours != ''">
and t.hours= #{hours}
</if>
--
Gitblit v1.8.0