mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-25 16:51:52 +08:00
【功能修复】处理统计可能导致的空指针问题
This commit is contained in:
parent
e850fbf675
commit
69695b1189
@ -69,9 +69,18 @@ public class MemberStatisticsServiceImpl implements MemberStatisticsService {
|
|||||||
bo -> AreaUtils.getParentIdByType(bo.getAreaId(), AreaTypeEnum.PROVINCE),
|
bo -> AreaUtils.getParentIdByType(bo.getAreaId(), AreaTypeEnum.PROVINCE),
|
||||||
bo -> bo,
|
bo -> bo,
|
||||||
(a, b) -> new MemberAreaStatisticsRespBO()
|
(a, b) -> new MemberAreaStatisticsRespBO()
|
||||||
.setOrderCreateUserCount(a.getOrderCreateUserCount() + b.getOrderCreateUserCount())
|
.setOrderCreateUserCount(
|
||||||
.setOrderPayUserCount(a.getOrderPayUserCount() + b.getOrderPayUserCount())
|
(a.getOrderCreateUserCount() != null ? a.getOrderCreateUserCount() : 0) +
|
||||||
.setOrderPayPrice(a.getOrderPayPrice() + b.getOrderPayPrice()));
|
(b.getOrderCreateUserCount() != null ? b.getOrderCreateUserCount() : 0)
|
||||||
|
)
|
||||||
|
.setOrderPayUserCount(
|
||||||
|
(a.getOrderPayUserCount() != null ? a.getOrderPayUserCount() : 0) +
|
||||||
|
(b.getOrderPayUserCount() != null ? b.getOrderPayUserCount() : 0)
|
||||||
|
)
|
||||||
|
.setOrderPayPrice(
|
||||||
|
(a.getOrderPayPrice() != null ? a.getOrderPayPrice() : 0.0) +
|
||||||
|
(b.getOrderPayPrice() != null ? b.getOrderPayPrice() : 0.0)
|
||||||
|
)
|
||||||
// 拼接数据
|
// 拼接数据
|
||||||
List<Area> areaList = AreaUtils.getByType(AreaTypeEnum.PROVINCE, area -> area);
|
List<Area> areaList = AreaUtils.getByType(AreaTypeEnum.PROVINCE, area -> area);
|
||||||
areaList.add(new Area().setId(null).setName("未知"));
|
areaList.add(new Area().setId(null).setName("未知"));
|
||||||
|
Loading…
Reference in New Issue
Block a user