Commit 49299bc3efb0737a7ba919cc4d8fe3a80c427454

Authored by 张志伟
1 parent 107042bd

:ambulance: 保持率数据bug修复

fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/CustomerRetentionRatioBizService.java
... ... @@ -76,11 +76,12 @@ public class CustomerRetentionRatioBizService {
76 76  
77 77 private void extractingPerson(ShopInfo shop, Date nowDate) {
78 78 Timestamp preMonthDay = DateUtil.getExpiredMonth(nowDate, -1);
  79 + String monthString = DateUtil.getMonthString(preMonthDay);
79 80 List<StammkundePool> pools = Optional.ofNullable(stammkundePoolService.list(Wrappers.<StammkundePool>query()
80 81 .select("DISTINCT adviser_id", "adviser_name")
81 82 .eq("pool_status", 1)
82 83 .eq("shop_id", shop.getId())
83   - .apply("DATE_FORMAT(activation_time, '%Y-%m') = {0}", DateUtil.getMonthString(preMonthDay))
  84 + .apply("(DATE_FORMAT(reject_time, '%Y-%m') > {0} or reject_time is null) and DATE_FORMAT(activation_time, '%Y-%m') = {1}", monthString, monthString)
84 85 )
85 86 ).orElse(new ArrayList<>());
86 87 List<PostUserDTO> userDTOS = Optional.ofNullable(userService.getUserByRole(shop.getId(), RoleCode.FWGW)).orElse(new ArrayList<>());
... ...