From e409435a88e9b59e616362b2b9ef8375458b2612 Mon Sep 17 00:00:00 2001 From: liquanyu Date: Thu, 2 Aug 2018 14:58:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=8A=B5=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mainOrm/master/CouponMapper.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml b/platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml index 4b82700..8eeaec0 100644 --- a/platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml +++ b/platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml @@ -977,6 +977,13 @@ and h.hospital_id = #{hid} and p.type=2) t on c.coupon_template_id = t.id where create_hospital_id= #{hid} and status =2 and used_id is not null + + + and c.use_date >= #{startDate} + + + and c.use_date #{endDate} + GROUP BY user_id having count(1) >= (select count(1) from hospital_coupon_template_group h,coupon_template t ,coupon_type p where h.coupon_template_group_id=t.group_id and t.type_id=p.id -- 1.8.3.1