解决当某地区有人下单但无人支付时的空指针异常
Signed-off-by: 杨宇庆 <hiyyq@qq.com>
This commit is contained in:
parent
3367b4b6d4
commit
5a2554205d
@ -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("未知"));
|
||||
|
Loading…
Reference in New Issue
Block a user