Commit 2f816f1f8286dcb9ac323952b281d93c9852fb7e

Authored by litao@lymsh.com
1 parent 8ebd6141ca
Exists in master and in 1 other branch dev

改优惠券bug

Showing 2 changed files with 3 additions and 0 deletions

platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml View file @ 2f816f1
... ... @@ -698,6 +698,7 @@
698 698 and a.create_date <![CDATA[ < ]]> #{endDate}
699 699 </if>
700 700 and a.coupon_template_id = b.id and b.type_id = c.id
  701 + and ${hospitalFlag} = #{hid}
701 702 and c.type in
702 703 <foreach collection="couponType" open="(" close=")" separator="," item="type">
703 704 #{type}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java View file @ 2f816f1
... ... @@ -1652,6 +1652,7 @@
1652 1652 if(CollectionUtils.isNotEmpty(sendUserIds)) {
1653 1653 // List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(sendUserIds); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */
1654 1654 param.put("userIds", sendUserIds);
  1655 + param.put("hospitalFlag", "create_hospital_id"); /** 医院是用create_hospital_id 还是用 used_hospital_id限制*/
1655 1656 List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(param); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */
1656 1657 System.out.println(sendUserIds);
1657 1658 for (Map<String, Object> m : mulitPatienInfo) {
... ... @@ -1672,6 +1673,7 @@
1672 1673 if(CollectionUtils.isNotEmpty(usedUserIds)) {
1673 1674 // List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(CollectionUtils.createMap("userIds", usedUserIds, "startDate", param.get("startDate"))); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */
1674 1675 param.put("userIds", usedUserIds);
  1676 + param.put("hospitalFlag", "used_hospital_id");
1675 1677 List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(param); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */
1676 1678 for (Map<String, Object> m : mulitPatienInfo) {
1677 1679 Long count = (Long) m.get("count");