From 2cf928a22b6cf8ea7a29f29127ffc333c73b0bca Mon Sep 17 00:00:00 2001
From: wzy <wzy19931122ai@163.com>
Date: Sat, 26 Dec 2020 22:56:20 +0800
Subject: [PATCH] modify

---
 zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
index c8ab5b1..d1cf576 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
@@ -873,12 +873,17 @@
 		<if test="record.shopId != null">
 			and a.shop_id=#{record.shopId}
 		</if>
-		<if test="record.beginTime != null and record.endTime!=null">
-			and date_format(b.datatime, '%Y-%m-%d') between #{record.beginTime} and #{record.endTime}
+		<if test="record.beginTime != null">
+			and date_format(b.datatime, '%Y-%m-%d') >= date_format(#{record.beginTime}, '%Y-%m-%d')
 		</if>
-
+		<if test="record.endTime!=null">
+			and date_format(b.datatime, '%Y-%m-%d') >= date_format(#{record.endTime}, '%Y-%m-%d')
+		</if>
 		<if test="record.beaultId != null and record.beaultId!=''">
 			and FIND_IN_SET(#{record.beaultId}, a.BEATUY_ID)
+		</if>
+		<if test='record.t1 == "on"'>
+			and a.BEATUY_ID is not null
 		</if>
 		group by a.PHONE
 		<if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
@@ -915,12 +920,17 @@
 		<if test="record.shopId != null">
 			and a.shop_id=#{record.shopId}
 		</if>
-		<if test="record.beginTime != null and record.endTime!=null">
-			and date_format(b.datatime, '%Y-%m-%d') between #{record.beginTime} and #{record.endTime}
+		<if test="record.beginTime != null">
+			and date_format(b.datatime, '%Y-%m-%d') >= date_format(#{record.beginTime}, '%Y-%m-%d')
 		</if>
-
+		<if test="record.endTime!=null">
+			and date_format(b.datatime, '%Y-%m-%d') >= date_format(#{record.endTime}, '%Y-%m-%d')
+		</if>
 		<if test="record.beaultId != null and record.beaultId!=''">
 			and FIND_IN_SET(#{record.beaultId}, a.BEATUY_ID)
 		</if>
+		<if test='record.t1 == "on"'>
+			and a.BEATUY_ID is not null
+		</if>
 	</select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1