diff --git a/src/main/resources/mapper/OpSellerCustomerRelationDOMapper.xml b/src/main/resources/mapper/OpSellerCustomerRelationDOMapper.xml
index 9d6cb3a..4ff2b9b 100644
--- a/src/main/resources/mapper/OpSellerCustomerRelationDOMapper.xml
+++ b/src/main/resources/mapper/OpSellerCustomerRelationDOMapper.xml
@@ -37,12 +37,12 @@
CONCAT('%',#{search},'%'))
- and DATE_FORMAT(t2.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{startDate},'%Y-%m-%d')
+ and date(t1.create_time) >= #{startDate}
- and DATE_FORMAT(t2.create_time,'%Y-%m-%d') <= DATE_FORMAT(#{endDate},'%Y-%m-%d')
+ and date(t1.create_time <= #{endDate}
- GROUP BY t4.id order by t2.create_time desc
+ GROUP BY t4.id order by t1.create_time desc
diff --git a/src/main/resources/mapper/StorePromotionDataDOMapper.xml b/src/main/resources/mapper/StorePromotionDataDOMapper.xml
index bb8fb8c..99d37d6 100644
--- a/src/main/resources/mapper/StorePromotionDataDOMapper.xml
+++ b/src/main/resources/mapper/StorePromotionDataDOMapper.xml
@@ -294,25 +294,25 @@
WHERE t.store_id = #{storeId}
and t.customer_id = t2.id
- and DATE_FORMAT(t2.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{startDate},'%Y-%m-%d')
+ and date(t.create_time) >= #{startDate}
- and DATE_FORMAT(t2.create_time,'%Y-%m-%d') <= DATE_FORMAT(#{endDate},'%Y-%m-%d')
+ and date(t.create_time) <= #{endDate}
group by store_id
@@ -326,17 +326,18 @@
user_id AS id,
count( customer_id ) AS cusNum
FROM
- `op_seller_customer_relation`
+ `op_seller_customer_relation` t,op_customer t2
WHERE
- store_id = #{storeId}
+ t.customer_id = t2.id
+ and t. store_id = #{storeId}
- and DATE_FORMAT(create_time,'%Y-%m-%d') >= DATE_FORMAT(#{startDate},'%Y-%m-%d')
+ and date(t.create_time) >= #{startDate}
- and DATE_FORMAT(create_time,'%Y-%m-%d') <= DATE_FORMAT(#{endDate},'%Y-%m-%d')
+ and date(t.create_time) <= #{endDate}
GROUP BY
- user_id
+ t.user_id