crm:code review 员工客户分析

This commit is contained in:
YunaiV 2024-04-14 20:13:31 +08:00
parent 0d1e2c604d
commit 5159da30b4
3 changed files with 4 additions and 10 deletions

View File

@ -77,7 +77,7 @@ public interface CrmStatisticsCustomerService {
/** /**
* 客户成交周期(按日期) * 客户成交周期(按日期)
* <p> *
* 成交周期的定义客户 customer 在创建出来到合同 contract 第一次成交的时间差 * 成交周期的定义客户 customer 在创建出来到合同 contract 第一次成交的时间差
* *
* @param reqVO 请求参数 * @param reqVO 请求参数

View File

@ -310,8 +310,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe
} }
// 3. 拼接数据 // 3. 拼接数据
Map<Integer, Area> areaMap = convertMap(AreaUtils.getByType(AreaTypeEnum.PROVINCE, Function.identity()), Map<Integer, Area> areaMap = convertMap(AreaUtils.getByType(AreaTypeEnum.PROVINCE, Function.identity()), Area::getId);
Area::getId);
return convertList(dealCycleByAreaList, vo -> { return convertList(dealCycleByAreaList, vo -> {
if (vo.getAreaId() != null) { if (vo.getAreaId() != null) {
Integer parentId = AreaUtils.getParentIdByType(vo.getAreaId(), AreaTypeEnum.PROVINCE); Integer parentId = AreaUtils.getParentIdByType(vo.getAreaId(), AreaTypeEnum.PROVINCE);
@ -331,12 +330,8 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe
reqVO.setUserIds(userIds); reqVO.setUserIds(userIds);
// 2. 获取客户产品统计数据 // 2. 获取客户产品统计数据
List<CrmStatisticsCustomerDealCycleByProductRespVO> dealCycleByProductList = customerMapper.selectCustomerDealCycleGroupByProductId(reqVO); // TODO @dhb52未读取产品名
if (CollUtil.isEmpty(dealCycleByProductList)) { return customerMapper.selectCustomerDealCycleGroupByProductId(reqVO);
return Collections.emptyList();
}
return dealCycleByProductList;
} }
/** /**

View File

@ -16,7 +16,6 @@
GROUP BY time GROUP BY time
</select> </select>
<!-- TODO 芋艿:应该不用过滤时间 -->
<select id="selectCustomerDealCountGroupByDate" <select id="selectCustomerDealCountGroupByDate"
resultType="cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerSummaryByDateRespVO"> resultType="cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerSummaryByDateRespVO">
SELECT DATE_FORMAT(customer.create_time, '%Y-%m-%d') AS time, SELECT DATE_FORMAT(customer.create_time, '%Y-%m-%d') AS time,