|
@@ -1238,11 +1238,12 @@ public class ShopServiceImpl implements ShopService {
|
|
|
}
|
|
|
set = new HashSet<>();
|
|
|
List<ReturnEntityVo> userIdentity1 = shopMapper.getUserIdentity(startTime, endTime, shopKeyword);
|
|
|
- // 所有值之和
|
|
|
- AtomicInteger maxUserValue = new AtomicInteger(0);
|
|
|
if (null != userIdentity1 && userIdentity1.size() > 0) {
|
|
|
+ userIdentity1.removeIf( user -> StringUtils.isBlank(user.getName()));
|
|
|
+ // 所有值之和
|
|
|
+ AtomicInteger maxUserValue = new AtomicInteger(0);
|
|
|
for (ReturnEntityVo returnEntityVo : userIdentity1) {
|
|
|
- maxUserValue.updateAndGet(max -> max + Integer.parseInt(returnEntityVo.getValue()));
|
|
|
+ // maxUserValue.set(MathUtil.add(Integer.parseInt(returnEntityVo.getValue()),maxUserValue.get()).intValue());
|
|
|
if (!set.contains(returnEntityVo.getName())) {
|
|
|
set.add(returnEntityVo.getName());
|
|
|
userIdentity.add(returnEntityVo);
|
|
@@ -1252,15 +1253,23 @@ public class ShopServiceImpl implements ShopService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- userIdentity.forEach(returnUserIdentity -> returnUserIdentity.setValue(MathUtil.div(returnUserIdentity.getValue(), maxUserValue.get(), 2).toString()));
|
|
|
+ userIdentity.forEach( user -> maxUserValue.set(MathUtil.add(Integer.parseInt(user.getValue()), maxUserValue.get()).intValue()));
|
|
|
+ userIdentity.forEach(returnUserIdentity -> {
|
|
|
+ log.info("returnUserIdentity.getValue()==="+returnUserIdentity.getValue());
|
|
|
+ log.info("maxUserValue.get()==="+maxUserValue.get());
|
|
|
+ String values = MathUtil.mul(MathUtil.div(returnUserIdentity.getValue(), maxUserValue.get(), 2), 100).toString();
|
|
|
+ log.info("values==="+values);
|
|
|
+ returnUserIdentity.setValue(values);
|
|
|
+ });
|
|
|
}
|
|
|
set = new HashSet<>();
|
|
|
List<ReturnEntityVo> clubType1 = shopMapper.getClubType(startTime, endTime, shopKeyword);
|
|
|
if (null != clubType1 && clubType1.size() > 0) {
|
|
|
+ clubType1.removeIf( club -> StringUtils.isBlank(club.getName()));
|
|
|
// 所有值之和
|
|
|
AtomicInteger maxClubTypeValue = new AtomicInteger(0);
|
|
|
for (ReturnEntityVo returnEntityVo : clubType1) {
|
|
|
- maxClubTypeValue.updateAndGet(max -> max + Integer.parseInt(returnEntityVo.getValue()));
|
|
|
+ // maxClubTypeValue.set(MathUtil.add(Integer.parseInt(returnEntityVo.getValue()), maxClubTypeValue.get()).intValue());
|
|
|
if (!set.contains(returnEntityVo.getName())) {
|
|
|
set.add(returnEntityVo.getName());
|
|
|
clubType.add(returnEntityVo);
|
|
@@ -1270,7 +1279,14 @@ public class ShopServiceImpl implements ShopService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- userIdentity.forEach(returnUserIdentity -> returnUserIdentity.setValue(MathUtil.div(returnUserIdentity.getValue(), maxClubTypeValue.get(), 2).toString()));
|
|
|
+ clubType.forEach( club -> maxClubTypeValue.set(MathUtil.add(Integer.parseInt(club.getValue()), maxClubTypeValue.get()).intValue()));
|
|
|
+ clubType.forEach(returnUserIdentity -> {
|
|
|
+ log.info("returnUserIdentity.getValue()==="+returnUserIdentity.getValue());
|
|
|
+ log.info("maxClubTypeValue.get()==="+maxClubTypeValue.get());
|
|
|
+ String values = MathUtil.mul(MathUtil.div(returnUserIdentity.getValue(), maxClubTypeValue.get(), 2), 100).toString();
|
|
|
+ log.info("values==="+values);
|
|
|
+ returnUserIdentity.setValue(values);
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
map.put("channels", regionMap);
|