Commit 94a16c3783f4131c91f7160aacc4cbd123277558

Authored by liquanyu
1 parent aa02462921

优惠劵统计优化

Showing 2 changed files with 8 additions and 8 deletions

platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml View file @ 94a16c3
... ... @@ -873,18 +873,18 @@
873 873 select DATE_FORMAT(a.create_date, '%Y-%m-%d') as ymd, a.user_id
874 874 from coupon_info a, coupon_template b, coupon_type c
875 875 where 1=1
876   - <if test="startDate != null">
877   - and a.create_date >= #{startDate}
878   - </if>
879   - <if test="endDate != null">
880   - and a.create_date <![CDATA[ < ]]> #{endDate}
881   - </if>
882 876 and a.coupon_template_id = b.id and b.type_id = c.id
883 877 and a.${hospitalFlag} = #{hid}
884 878 and c.type in
885 879 <foreach collection="couponType" open="(" close=")" separator="," item="type">
886 880 #{type}
887 881 </foreach>
  882 + <if test="startDate != null">
  883 + and a.create_date >= #{startDate}
  884 + </if>
  885 + <if test="endDate != null">
  886 + and a.create_date <![CDATA[ < ]]> #{endDate}
  887 + </if>
888 888 order by a.create_date desc
889 889 ) a group by a.ymd, a.user_id
890 890 ) a group by a.user_id
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java View file @ 94a16c3
... ... @@ -2463,7 +2463,7 @@
2463 2463 if(CollectionUtils.isNotEmpty(hospitalId)) {
2464 2464 if(CollectionUtils.isNotEmpty(hospitalNames)) {
2465 2465 if (org.apache.commons.collections.CollectionUtils.isNotEmpty(hospitalId)) {
2466   - int batchSize = 5;
  2466 + int batchSize = 4;
2467 2467 int end = 0;
2468 2468 List<Future> listFuture = new ArrayList<>();
2469 2469 for (int i = 0; i < hospitalId.size(); i += batchSize) {
... ... @@ -2587,7 +2587,7 @@
2587 2587 List<String> sendUserIds2 = new ArrayList<>();
2588 2588 param.put("hid", map.get("hospitalId"));
2589 2589 if(CollectionUtils.isNotEmpty(sendUserIds)) {
2590   - param.put("userIds", sendUserIds);
  2590 +// param.put("userIds", sendUserIds);
2591 2591 param.put("hospitalFlag", "create_hospital_id"); /** 医院是用create_hospital_id 还是用 used_hospital_id限制*/
2592 2592 // List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(param); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */
2593 2593 List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfoWithSend(param); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */