From 5a2554205d4ae8b94e91b7ab6cfa43844bc95f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=AE=87=E5=BA=86?= Date: Sun, 4 Feb 2024 18:59:53 +0000 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=BD=93=E6=9F=90=E5=9C=B0?= =?UTF-8?q?=E5=8C=BA=E6=9C=89=E4=BA=BA=E4=B8=8B=E5=8D=95=E4=BD=86=E6=97=A0?= =?UTF-8?q?=E4=BA=BA=E6=94=AF=E4=BB=98=E6=97=B6=E7=9A=84=E7=A9=BA=E6=8C=87?= =?UTF-8?q?=E9=92=88=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 杨宇庆 --- .../statistics/service/member/MemberStatisticsServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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("未知"));