From 5159da30b4b5cf0fe290b8a1f411709ade6bcdd4 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 14 Apr 2024 20:13:31 +0800 Subject: [PATCH] =?UTF-8?q?crm=EF=BC=9Acode=20review=20=E5=91=98=E5=B7=A5?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../statistics/CrmStatisticsCustomerService.java | 2 +- .../statistics/CrmStatisticsCustomerServiceImpl.java | 11 +++-------- .../mapper/statistics/CrmStatisticsCustomerMapper.xml | 1 - 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java index 56ecf975e..70c720b9e 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java @@ -77,7 +77,7 @@ public interface CrmStatisticsCustomerService { /** * 客户成交周期(按日期) - *

+ * * 成交周期的定义:客户 customer 在创建出来,到合同 contract 第一次成交的时间差 * * @param reqVO 请求参数 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java index c5b933c43..b7b9a08d1 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerServiceImpl.java @@ -310,8 +310,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe } // 3. 拼接数据 - Map areaMap = convertMap(AreaUtils.getByType(AreaTypeEnum.PROVINCE, Function.identity()), - Area::getId); + Map areaMap = convertMap(AreaUtils.getByType(AreaTypeEnum.PROVINCE, Function.identity()), Area::getId); return convertList(dealCycleByAreaList, vo -> { if (vo.getAreaId() != null) { Integer parentId = AreaUtils.getParentIdByType(vo.getAreaId(), AreaTypeEnum.PROVINCE); @@ -331,12 +330,8 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe reqVO.setUserIds(userIds); // 2. 获取客户产品统计数据 - List dealCycleByProductList = customerMapper.selectCustomerDealCycleGroupByProductId(reqVO); - if (CollUtil.isEmpty(dealCycleByProductList)) { - return Collections.emptyList(); - } - - return dealCycleByProductList; + // TODO @dhb52:未读取产品名 + return customerMapper.selectCustomerDealCycleGroupByProductId(reqVO); } /** diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml index e850a0c88..7c1016dff 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml @@ -16,7 +16,6 @@ GROUP BY time -