Commit bb900f6676e4c0084bbe66e131ecfe815e23c8a1

Authored by litao
1 parent 19b302f863
Exists in master and in 1 other branch dev

count

bug
 xiufu

Showing 1 changed file with 4 additions and 1 deletions

platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml View file @ bb900f6
... ... @@ -327,7 +327,7 @@
327 327  
328 328 <select id="findCouponInfoCount" parameterType="map" resultType="integer">
329 329 select count(1) from (
330   - select a.used_hospital_id, c.type, b.coupon_order, a.sequence_id, d.name as send_hospital, a.use_date, a.used_id
  330 + select a.used_hospital_id, c.type, b.coupon_order, a.sequence_id, d.name as send_hospital, a.use_date, a.used_id, a.operator_use_id
331 331 from coupon_info a, coupon_template b, coupon_type c, organization d
332 332 where a.coupon_template_id = b.id and b.type_id = c.id and a.create_hospital_id = d.id
333 333 and a.used_hospital_id in
... ... @@ -338,6 +338,9 @@
338 338 <foreach collection="couponType" open="(" close=")" separator="," item="type">
339 339 #{type}
340 340 </foreach>
  341 + <if test="coupon_order != null">
  342 + and b.coupon_order = #{coupon_order}
  343 + </if>
341 344 <if test="startDate != null">
342 345 and a.use_date >= #{startDate}
343 346 </if>