From 7e7f901b2172281dc294dfbc67e6ad00625f09f4 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期一, 04 三月 2024 10:11:21 +0800 Subject: [PATCH] 合并代码 --- cloud-server-other/src/main/resources/mapper/SiteBookingMapper.xml | 34 ++++++++++++++++++++-------------- 1 files changed, 20 insertions(+), 14 deletions(-) diff --git a/cloud-server-other/src/main/resources/mapper/SiteBookingMapper.xml b/cloud-server-other/src/main/resources/mapper/SiteBookingMapper.xml index f4f5300..36b048b 100644 --- a/cloud-server-other/src/main/resources/mapper/SiteBookingMapper.xml +++ b/cloud-server-other/src/main/resources/mapper/SiteBookingMapper.xml @@ -4,11 +4,11 @@ <select id="queryDatas" resultType="com.dsh.other.model.BillingRequestOfType"> - SELECT DATE_FORMAT(insertTime, '%m-%d %H:%i')as `time`, + SELECT DATE_FORMAT(insertTime, '%m-%d %H:%i')as `time`,DATE_FORMAT(payTime, '%m-%d %H:%i')as `time1`, payMoney as amount, `status` from t_site_booking - where payType != 3 and status != 0 + where payType != 3 and status != 0 <if test="null != monthStart and '' != monthStart and null != monthEnd and '' != monthEnd"> and DATE_FORMAT(payTime, '%Y-%m-%d %H:%i:%s') between #{monthStart} and #{monthEnd} </if> @@ -20,18 +20,24 @@ <select id="listAll" resultType="com.dsh.other.entity.SiteBooking"> select * from t_site_booking t1 <where> - <if test="amount!=null and amount!= ''"> - and t1.payMoney <= #{amount} - </if> - <if test="query.userIds != null and query.userIds.size()>0"> - AND t1.appUserId IN - <foreach collection="query.userIds" separator="," item="id" open="(" close=")"> - #{id} - </foreach> - </if> - <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''"> - and t1.insertTime between #{sTime} and #{eTime} - </if> + <if test="amount!=null and amount!= ''"> + and t1.payMoney <= #{amount} + </if> + <if test="query.userIds != null and query.userIds.size()>0"> + AND t1.appUserId IN + <foreach collection="query.userIds" separator="," item="id" open="(" close=")"> + #{id} + </foreach> + </if> + <if test="query.storeIds != null and query.storeIds.size()>0"> + AND t1.storeId IN + <foreach collection="query.storeIds" separator="," item="id" open="(" close=")"> + #{id} + </foreach> + </if> + <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''"> + and t1.insertTime between #{sTime} and #{eTime} + </if> </where> </select> <select id="queryByCode" resultType="java.lang.Integer"> -- Gitblit v1.7.1