| | |
| | | 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> |