Commit e409435a88e9b59e616362b2b9ef8375458b2612
1 parent
4dc9572a32
Exists in
master
and in
6 other branches
优惠劵查询
Showing 1 changed file with 7 additions and 0 deletions
platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml
View file @
e409435
... | ... | @@ -977,6 +977,13 @@ |
977 | 977 | and h.hospital_id = #{hid} |
978 | 978 | and p.type=2) t on c.coupon_template_id = t.id |
979 | 979 | where create_hospital_id= #{hid} and status =2 and used_id is not null |
980 | + | |
981 | + <if test="startDate != null"> | |
982 | + and c.use_date >= #{startDate} | |
983 | + </if> | |
984 | + <if test="endDate != null"> | |
985 | + and c.use_date <![CDATA[ =< ]]> #{endDate} | |
986 | + </if> | |
980 | 987 | GROUP BY user_id having count(1) >= (select count(1) |
981 | 988 | from hospital_coupon_template_group h,coupon_template t ,coupon_type p |
982 | 989 | where h.coupon_template_group_id=t.group_id and t.type_id=p.id |