Commit 18e4e434de5f9b47601b817847dac67663188d21
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 2 changed files
platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml
View file @
18e4e43
... | ... | @@ -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 a.${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 @
18e4e43
... | ... | @@ -1649,9 +1649,11 @@ |
1649 | 1649 | for (Map<String, Object> map : couponReport) { |
1650 | 1650 | List<String> sendUserIds = (List<String>) map.get("sendUserIds"); |
1651 | 1651 | List<String> sendUserIds2 = new ArrayList<>(); |
1652 | + param.put("hid", map.get("hospitalId")); | |
1652 | 1653 | if(CollectionUtils.isNotEmpty(sendUserIds)) { |
1653 | 1654 | // List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(sendUserIds); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */ |
1654 | 1655 | param.put("userIds", sendUserIds); |
1656 | + param.put("hospitalFlag", "create_hospital_id"); /** 医院是用create_hospital_id 还是用 used_hospital_id限制*/ | |
1655 | 1657 | List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(param); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */ |
1656 | 1658 | System.out.println(sendUserIds); |
1657 | 1659 | for (Map<String, Object> m : mulitPatienInfo) { |
... | ... | @@ -1672,6 +1674,7 @@ |
1672 | 1674 | if(CollectionUtils.isNotEmpty(usedUserIds)) { |
1673 | 1675 | // List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(CollectionUtils.createMap("userIds", usedUserIds, "startDate", param.get("startDate"))); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */ |
1674 | 1676 | param.put("userIds", usedUserIds); |
1677 | + param.put("hospitalFlag", "used_hospital_id"); | |
1675 | 1678 | List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(param); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */ |
1676 | 1679 | for (Map<String, Object> m : mulitPatienInfo) { |
1677 | 1680 | Long count = (Long) m.get("count"); |