diff --git a/src/main/resources/mapper/StorePromotionDataDOMapper.xml b/src/main/resources/mapper/StorePromotionDataDOMapper.xml index f999bd9..bb8fb8c 100644 --- a/src/main/resources/mapper/StorePromotionDataDOMapper.xml +++ b/src/main/resources/mapper/StorePromotionDataDOMapper.xml @@ -290,13 +290,14 @@ @@ -366,12 +367,13 @@ t1.id AS storeId FROM poi_store t1 - LEFT JOIN `op_seller_customer_relation` t2 ON t1.id = t2.store_id + JOIN `op_seller_customer_relation` t2 ON t1.id = t2.store_id + JOIN op_customer t3 on t2.customer_id = t3.id - and DATE_FORMAT(t2.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{startDate},'%Y-%m-%d') + and DATE_FORMAT(t3.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{startDate},'%Y-%m-%d') - and DATE_FORMAT(t2.create_time,'%Y-%m-%d') <= DATE_FORMAT(#{endDate},'%Y-%m-%d') + and DATE_FORMAT(t3.create_time,'%Y-%m-%d') <= DATE_FORMAT(#{endDate},'%Y-%m-%d') WHERE t1.STATUS = 1