Merge remote-tracking branch 'origin/master'

This commit is contained in:
YunaiV 2024-02-17 21:41:08 +08:00
commit 08c259424a
1 changed files with 2 additions and 1 deletions

View File

@ -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<Area> areaList = AreaUtils.getByType(AreaTypeEnum.PROVINCE, area -> area);
areaList.add(new Area().setId(null).setName("未知"));