From 2386300f1ed591e6c46b7f32539cac7f2fd7d434 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期二, 18 七月 2023 08:58:31 +0800 Subject: [PATCH] 更新预约场地部分接口 --- cloud-server-other/src/main/resources/mapper/SiteMapper.xml | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/cloud-server-other/src/main/resources/mapper/SiteMapper.xml b/cloud-server-other/src/main/resources/mapper/SiteMapper.xml index ef50ff2..cf93290 100644 --- a/cloud-server-other/src/main/resources/mapper/SiteMapper.xml +++ b/cloud-server-other/src/main/resources/mapper/SiteMapper.xml @@ -3,4 +3,33 @@ <mapper namespace="com.dsh.other.mapper.SiteMapper"> + <select id="querySiteList" resultType="com.dsh.other.model.QuerySiteListVo"> + select + a.id, + a.`name`, + c.`name` as siteTypeName, + b.`name` as storeName, + b.address as storeAddress, + b.lon as storeLon, + b.lat as storeLat, + CONCAT(a.appointmentStartTime, '-', a.appointmentEndTime) as times, + a.cashPrice as price + from t_site a + left join t_store b on (a.storeId = b.id) + left join t_site_type c on (a.siteTypeId = c.id) + where a.state = 1 + <if test="null != item.startTime and '' != item.startTime and null != item.endTime and '' != item.endTime"> + and CONCAT(DATE_FORMAT(now, '%Y-%m-%d', ' ', a.appointmentStartTime)) <= CONCAT(DATE_FORMAT(now, '%Y-%m-%d', ' ', #{item.startTime})) and CONCAT(DATE_FORMAT(now, '%Y-%m-%d', ' ', a.appointmentEndTime)) >= CONCAT(DATE_FORMAT(now, '%Y-%m-%d', ' ', #{item.endTime})) + </if> + <if test="null != item.siteTypeId"> + and a.siteTypeId = #{item.siteTypeId} + </if> + <if test="null != item.cityCode"> + and b.cityCode = #{item.cityCode} + </if> + <if test="null != item.storeId"> + and a.storeId = #{item.storeId} + </if> + order by a.insertTime desc limit #{item.pageNum}, #{item.pageSize} + </select> </mapper> -- Gitblit v1.7.1