crm:code review 员工客户分析

plp
YunaiV 2 years ago
parent 0d1e2c604d
commit 5159da30b4

@ -77,7 +77,7 @@ public interface CrmStatisticsCustomerService {
/** /**
* () * ()
* <p> *
* customer contract * customer contract
* *
* @param reqVO * @param reqVO

@ -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;
} }
/** /**

@ -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,

Loading…
Cancel
Save