📖 CRM:code review 商业智能的排行版

This commit is contained in:
YunaiV 2024-02-17 18:14:28 +08:00
parent bba32c6ba3
commit c40ea1eaa6
3 changed files with 14 additions and 10 deletions

View File

@ -77,4 +77,5 @@ public interface CrmBiRankingMapper {
* @return 跟进客户数排行榜
*/
List<CrmBiRanKRespVO> selectFollowCustomerCountRank(CrmBiRankReqVO rankReqVO);
}

View File

@ -76,4 +76,5 @@ public interface CrmBiRankingService {
* @return 跟进客户数排行榜
*/
List<CrmBiRanKRespVO> getFollowCustomerCountRank(CrmBiRankReqVO rankReqVO);
}

View File

@ -94,7 +94,8 @@
<select id="selectFollowCountRank"
resultType="cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRanKRespVO">
SELECT COUNT(1) AS count, cc.owner_user_id
FROM crm_follow_up_record AS cfur LEFT JOIN crm_contact AS cc ON FIND_IN_SET(cc.id, cfur.contact_ids)
FROM crm_follow_up_record AS cfur
LEFT JOIN crm_contact AS cc ON FIND_IN_SET(cc.id, cfur.contact_ids)
WHERE cfur.deleted = 0
AND cc.deleted = 0
AND cc.owner_user_id in
@ -109,7 +110,8 @@
<select id="selectFollowCustomerCountRank"
resultType="cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRanKRespVO">
SELECT COUNT(DISTINCT cc.id) AS count, cc.owner_user_id
FROM crm_follow_up_record AS cfur LEFT JOIN crm_contact AS cc ON FIND_IN_SET(cc.id, cfur.contact_ids)
FROM crm_follow_up_record AS cfur
LEFT JOIN crm_contact AS cc ON FIND_IN_SET(cc.id, cfur.contact_ids)
WHERE cfur.deleted = 0
AND cc.deleted = 0
AND cc.owner_user_id in