Commit 617d8aefc6d1c50970fcd3ba14e2ecaf1be9d760
1 parent
130142a3a8
Exists in
master
and in
6 other branches
改bug
Showing 3 changed files with 9 additions and 5 deletions
platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/CouponMapper.java
View file @
617d8ae
... | ... | @@ -115,7 +115,7 @@ |
115 | 115 | |
116 | 116 | Integer findUnUsedPeopleInfoCount(Map<String, Object> param); |
117 | 117 | |
118 | - List<Map<String, Object>> findMulitPatienInfo(List<String> sendUserIds); | |
118 | + List<Map<String, Object>> findMulitPatienInfo(Map<String, Object> param); | |
119 | 119 | |
120 | 120 | List<Map<String,Object>> findUserSendInfoByUids(Map<String, Object> uids); |
121 | 121 |
platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml
View file @
617d8ae
... | ... | @@ -682,15 +682,18 @@ |
682 | 682 | </select> |
683 | 683 | |
684 | 684 | |
685 | - <select id="findMulitPatienInfo" parameterType="list" resultType="map"> | |
685 | + <select id="findMulitPatienInfo" parameterType="map" resultType="map"> | |
686 | 686 | select count(1) as count, a.user_id as user_id from ( |
687 | 687 | select a.ymd, a.user_id from ( |
688 | 688 | select DATE_FORMAT(create_date, '%Y-%m-%d') as ymd, user_id |
689 | 689 | from coupon_info |
690 | 690 | where user_id in |
691 | - <foreach collection="list" open="(" close=")" separator="," item="uid"> | |
691 | + <foreach collection="userIds" open="(" close=")" separator="," item="uid"> | |
692 | 692 | #{uid} |
693 | 693 | </foreach> |
694 | + <if test="startDate != null"> | |
695 | + and create_date > #{startDate} | |
696 | + </if> | |
694 | 697 | order by create_date desc |
695 | 698 | ) a group by a.ymd, a.user_id |
696 | 699 | ) a group by a.user_id |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java
View file @
617d8ae
... | ... | @@ -1284,7 +1284,8 @@ |
1284 | 1284 | List<String> sendUserIds = (List<String>) map.get("sendUserIds"); |
1285 | 1285 | List<String> sendUserIds2 = new ArrayList<>(); |
1286 | 1286 | if(CollectionUtils.isNotEmpty(sendUserIds)) { |
1287 | - List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(sendUserIds); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */ | |
1287 | +// List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(sendUserIds); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */ | |
1288 | + List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(CollectionUtils.createMap("userIds", sendUserIds, "startDate", param.get("startDate"))); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */ | |
1288 | 1289 | for (Map<String, Object> m : mulitPatienInfo) { |
1289 | 1290 | Long count = (Long) m.get("count"); |
1290 | 1291 | sendUserIds2.add((String) m.get("user_id")); |
... | ... | @@ -1301,7 +1302,7 @@ |
1301 | 1302 | List<String> usedUserIds = (List<String>) map.get("usedUserIds"); |
1302 | 1303 | List<String> usedUserIds2 = new ArrayList<>(); |
1303 | 1304 | if(CollectionUtils.isNotEmpty(usedUserIds)) { |
1304 | - List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(usedUserIds); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */ | |
1305 | + List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(CollectionUtils.createMap("userIds", usedUserIds, "startDate", param.get("startDate"))); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */ | |
1305 | 1306 | for (Map<String, Object> m : mulitPatienInfo) { |
1306 | 1307 | Long count = (Long) m.get("count"); |
1307 | 1308 | usedUserIds2.add((String) m.get("user_id")); |