Commit 34e6eab0e298f964fb74f7fc0cf9640762335a4b

Authored by 张志伟
2 parents 7a1c899c 7edb9b06

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

fw-valhalla-service/src/main/java/cn/fw/valhalla/service/report/CustomerRetentionRatioBizService.java
... ... @@ -174,8 +174,7 @@ public class CustomerRetentionRatioBizService {
174 174 List<CustomerRetentionRatio> list = new ArrayList<>();
175 175 for (UserInfo userInfo : set) {
176 176 List<UserRoleDataRangeDTO> userRoleDataRange = userService.getUserRoleDataRange(userInfo.getUserId(), RoleCode.FWGW);
177   - boolean noneMatch = userRoleDataRange.stream().noneMatch(r -> r.getRangeValue().equals(shop.getId()));
178   - if (CollectionUtils.isEmpty(userRoleDataRange) || noneMatch) {
  177 + if (CollectionUtils.isEmpty(userRoleDataRange)) {
179 178 String cacheKey = String.format("%s:%s:%s:%s", getStashRetentionKey(), YearMonth.from(DateUtil.date2LocalDate(nowDate)), shop.getId(), userInfo.getUserId());
180 179 String jsonString = stringRedisTemplate.opsForValue().get(cacheKey);
181 180 if (StringUtils.isEmpty(jsonString)) {
... ... @@ -190,6 +189,10 @@ public class CustomerRetentionRatioBizService {
190 189 list.addAll(roleChangeCacheInfoList);
191 190 }
192 191 } else {
  192 + boolean noneMatch = userRoleDataRange.stream().noneMatch(r -> r.getRangeValue().equals(shop.getId()));
  193 + if (noneMatch) {
  194 + continue;
  195 + }
193 196 fillPersonData(shop, userInfo, nowDate, list);
194 197 }
195 198 }
... ...