Commit 423140d16e9fc53c6d608569c22ef9858610391a

Authored by 张志伟
2 parents 41e08c05 49299bc3

Merge remote-tracking branch 'origin/dev' into test

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<>());
... ...