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 第一次成交的时间差
*
* @param reqVO 请求参数

View File

@ -310,8 +310,7 @@ public class CrmStatisticsCustomerServiceImpl implements CrmStatisticsCustomerSe
}
// 3. 拼接数据
Map<Integer, Area> areaMap = convertMap(AreaUtils.getByType(AreaTypeEnum.PROVINCE, Function.identity()),
Area::getId);
Map<Integer, Area> 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<CrmStatisticsCustomerDealCycleByProductRespVO> dealCycleByProductList = customerMapper.selectCustomerDealCycleGroupByProductId(reqVO);
if (CollUtil.isEmpty(dealCycleByProductList)) {
return Collections.emptyList();
}
return dealCycleByProductList;
// TODO @dhb52未读取产品名
return customerMapper.selectCustomerDealCycleGroupByProductId(reqVO);
}
/**

View File

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