diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsServiceImpl.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsServiceImpl.java index 7b159059f..60e9b3c18 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsServiceImpl.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsServiceImpl.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.statistics.service.member; import cn.hutool.core.date.LocalDateTimeUtil; +import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.ip.core.Area; import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum; @@ -71,7 +72,7 @@ public class MemberStatisticsServiceImpl implements MemberStatisticsService { (a, b) -> new MemberAreaStatisticsRespBO() .setOrderCreateUserCount(a.getOrderCreateUserCount() + b.getOrderCreateUserCount()) .setOrderPayUserCount(a.getOrderPayUserCount() + b.getOrderPayUserCount()) - .setOrderPayPrice(a.getOrderPayPrice() + b.getOrderPayPrice())); + .setOrderPayPrice(ObjUtil.defaultIfNull(a.getOrderPayPrice(), 0) + ObjUtil.defaultIfNull(b.getOrderPayPrice(), 0))); // 拼接数据 List areaList = AreaUtils.getByType(AreaTypeEnum.PROVINCE, area -> area); areaList.add(new Area().setId(null).setName("未知"));