Your Name
2023-07-11 d7d9b601b2e4fdb663375993e2cfbdbd363df421
java110-db/src/main/resources/mapper/community/CommunitySpaceOpenTimeV1ServiceDaoImplMapper.xml
@@ -31,9 +31,20 @@
        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}
@@ -50,7 +61,7 @@
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        order by t.create_time desc
        order by t.hours
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>