Commit ebd5ba02d2dd48b9e6316d64fa91551f763a07b3
1 parent
b2da43f4
【优化】CRM:增加对 JDK8 的兼容性,使用 ListUtil 替代 List of
Showing
4 changed files
with
8 additions
and
4 deletions
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java
| 1 | 1 | package cn.iocoder.yudao.module.crm.service.statistics; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.hutool.core.collection.ListUtil; | |
| 4 | 5 | import cn.hutool.core.util.ObjUtil; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.util.number.NumberUtils; |
| ... | ... | @@ -354,7 +355,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe |
| 354 | 355 | private List<Long> getUserIds(CrmStatisticsCustomerReqVO reqVO) { |
| 355 | 356 | // 情况一:选中某个用户 |
| 356 | 357 | if (ObjUtil.isNotNull(reqVO.getUserId())) { |
| 357 | - return List.of(reqVO.getUserId()); | |
| 358 | + return ListUtil.of(reqVO.getUserId()); | |
| 358 | 359 | } |
| 359 | 360 | // 情况二:选中某个部门 |
| 360 | 361 | // 2.1 获得部门列表 | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsFunnelServiceImpl.java
| 1 | 1 | package cn.iocoder.yudao.module.crm.service.statistics; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.hutool.core.collection.ListUtil; | |
| 4 | 5 | import cn.hutool.core.util.ObjUtil; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; |
| ... | ... | @@ -140,7 +141,7 @@ public class CrmStatisticsFunnelServiceImpl implements CrmStatisticsFunnelServic |
| 140 | 141 | private List<Long> getUserIds(CrmStatisticsFunnelReqVO reqVO) { |
| 141 | 142 | // 情况一:选中某个用户 |
| 142 | 143 | if (ObjUtil.isNotNull(reqVO.getUserId())) { |
| 143 | - return List.of(reqVO.getUserId()); | |
| 144 | + return ListUtil.of(reqVO.getUserId()); | |
| 144 | 145 | } |
| 145 | 146 | // 情况二:选中某个部门 |
| 146 | 147 | // 2.1 获得部门列表 | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPerformanceServiceImpl.java
| 1 | 1 | package cn.iocoder.yudao.module.crm.service.statistics; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.hutool.core.collection.ListUtil; | |
| 4 | 5 | import cn.hutool.core.date.LocalDateTimeUtil; |
| 5 | 6 | import cn.hutool.core.util.ObjUtil; |
| 6 | 7 | import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceReqVO; |
| ... | ... | @@ -161,7 +162,7 @@ public class CrmStatisticsPerformanceServiceImpl implements CrmStatisticsPerform |
| 161 | 162 | private List<Long> getUserIds(CrmStatisticsPerformanceReqVO reqVO) { |
| 162 | 163 | // 情况一:选中某个用户 |
| 163 | 164 | if (ObjUtil.isNotNull(reqVO.getUserId())) { |
| 164 | - return List.of(reqVO.getUserId()); | |
| 165 | + return ListUtil.of(reqVO.getUserId()); | |
| 165 | 166 | } |
| 166 | 167 | // 情况二:选中某个部门 |
| 167 | 168 | // 2.1 获得部门列表 | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsPortraitServiceImpl.java
| 1 | 1 | package cn.iocoder.yudao.module.crm.service.statistics; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.hutool.core.collection.ListUtil; | |
| 4 | 5 | import cn.hutool.core.util.ObjUtil; |
| 5 | 6 | import cn.iocoder.yudao.framework.ip.core.Area; |
| 6 | 7 | import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum; |
| ... | ... | @@ -117,7 +118,7 @@ public class CrmStatisticsPortraitServiceImpl implements CrmStatisticsPortraitSe |
| 117 | 118 | private List<Long> getUserIds(CrmStatisticsPortraitReqVO reqVO) { |
| 118 | 119 | // 情况一:选中某个用户 |
| 119 | 120 | if (ObjUtil.isNotNull(reqVO.getUserId())) { |
| 120 | - return List.of(reqVO.getUserId()); | |
| 121 | + return ListUtil.of(reqVO.getUserId()); | |
| 121 | 122 | } |
| 122 | 123 | // 情况二:选中某个部门 |
| 123 | 124 | // 2.1 获得部门列表 | ... | ... |