【优化】CRM:增加对 JDK8 的兼容性,使用 ListUtil 替代 List of

This commit is contained in:
YunaiV 2024-05-04 09:36:15 +08:00
parent b2da43f4c3
commit ebd5ba02d2
4 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.crm.service.statistics;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.util.ObjUtil;
import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils;
import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
@ -354,7 +355,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe
private List<Long> getUserIds(CrmStatisticsCustomerReqVO reqVO) {
// 情况一选中某个用户
if (ObjUtil.isNotNull(reqVO.getUserId())) {
return List.of(reqVO.getUserId());
return ListUtil.of(reqVO.getUserId());
}
// 情况二选中某个部门
// 2.1 获得部门列表

View File

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.crm.service.statistics;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.util.ObjUtil;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils;
@ -140,7 +141,7 @@ public class CrmStatisticsFunnelServiceImpl implements CrmStatisticsFunnelServic
private List<Long> getUserIds(CrmStatisticsFunnelReqVO reqVO) {
// 情况一选中某个用户
if (ObjUtil.isNotNull(reqVO.getUserId())) {
return List.of(reqVO.getUserId());
return ListUtil.of(reqVO.getUserId());
}
// 情况二选中某个部门
// 2.1 获得部门列表

View File

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.crm.service.statistics;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.util.ObjUtil;
import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceReqVO;
@ -161,7 +162,7 @@ public class CrmStatisticsPerformanceServiceImpl implements CrmStatisticsPerform
private List<Long> getUserIds(CrmStatisticsPerformanceReqVO reqVO) {
// 情况一选中某个用户
if (ObjUtil.isNotNull(reqVO.getUserId())) {
return List.of(reqVO.getUserId());
return ListUtil.of(reqVO.getUserId());
}
// 情况二选中某个部门
// 2.1 获得部门列表

View File

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.crm.service.statistics;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.util.ObjUtil;
import cn.iocoder.yudao.framework.ip.core.Area;
import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum;
@ -117,7 +118,7 @@ public class CrmStatisticsPortraitServiceImpl implements CrmStatisticsPortraitSe
private List<Long> getUserIds(CrmStatisticsPortraitReqVO reqVO) {
// 情况一选中某个用户
if (ObjUtil.isNotNull(reqVO.getUserId())) {
return List.of(reqVO.getUserId());
return ListUtil.of(reqVO.getUserId());
}
// 情况二选中某个部门
// 2.1 获得部门列表