From d7d9b601b2e4fdb663375993e2cfbdbd363df421 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: 星期二, 11 七月 2023 22:17:37 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity

---
 java110-db/src/main/resources/mapper/community/CommunitySpaceOpenTimeV1ServiceDaoImplMapper.xml |   11 +++++++++++
 1 files changed, 11 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 e17aea8..241a92a 100644
--- a/java110-db/src/main/resources/mapper/community/CommunitySpaceOpenTimeV1ServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/CommunitySpaceOpenTimeV1ServiceDaoImplMapper.xml
@@ -31,10 +31,21 @@
         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}
+        </if>
         where 1 =1
+        <if test="appointmentTime !=null and appointmentTime != ''">
+        and cspt.csp_id is null
+        </if>
         <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