Commit df116b337801eab5c8bc67d96e4ba12c287ccc09

Authored by litao
1 parent b2cf1a2d97

bug修复

Showing 1 changed file with 2 additions and 4 deletions

platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml View file @ df116b3
... ... @@ -425,7 +425,7 @@
425 425 </select>
426 426  
427 427 <select id="findUserSendInfo" parameterType="map" resultType="map">
428   - select a.create_hospital_id, a.user_id, DATE_FORMAT(a.create_date, '%Y-%m-%d') as create_date, d.name as send_hospital, e.name as doctoer_name
  428 + select distinct(a.create_hospital_id), a.user_id, DATE_FORMAT(a.create_date, '%Y-%m-%d') as create_date, d.name as send_hospital, e.name as doctoer_name
429 429 from
430 430 coupon_info a, coupon_template b, coupon_type c, organization d, users e
431 431 where a.coupon_template_id = b.id and b.type_id = c.id and a.create_hospital_id = d.id and a.create_user_id = e.id
432 432  
... ... @@ -443,13 +443,12 @@
443 443 <if test="endDate != null">
444 444 and a.create_date <![CDATA[ < ]]> #{endDate}
445 445 </if>
446   - group by a.user_id, a.create_date
447 446 limit #{currentPage},#{pageSize}
448 447 </select>
449 448  
450 449 <select id="findUserSendInfoCount" parameterType="map" resultType="integer">
451 450 select count(1) from (
452   - select a.create_hospital_id, a.user_id, DATE_FORMAT(a.create_date, '%Y-%m-%d') as create_date, d.name as send_hospital, e.name as doctoer_name
  451 + select distinct(a.create_hospital_id), a.user_id, DATE_FORMAT(a.create_date, '%Y-%m-%d') as create_date, d.name as send_hospital, e.name as doctoer_name
453 452 from
454 453 coupon_info a, coupon_template b, coupon_type c, organization d, users e
455 454 where a.coupon_template_id = b.id and b.type_id = c.id and a.create_hospital_id = d.id and a.create_user_id = e.id
... ... @@ -467,7 +466,6 @@
467 466 <if test="endDate != null">
468 467 and a.create_date <![CDATA[ < ]]> #{endDate}
469 468 </if>
470   - group by a.user_id, a.create_date
471 469 ) a
472 470 </select>
473 471