Преглед изворни кода

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

YunaiV пре 1 година
родитељ
комит
c40ea1eaa6

+ 1 - 0
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/bi/CrmBiRankingMapper.java

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

+ 1 - 0
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/bi/CrmBiRankingService.java

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

+ 12 - 10
yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/bi/CrmBiRankingMapper.xml

@@ -13,7 +13,7 @@
             #{userId}
         </foreach>
         AND order_date between #{times[0],javaType=java.time.LocalDateTime} and
-        #{times[1],javaType=java.time.LocalDateTime}
+            #{times[1],javaType=java.time.LocalDateTime}
         GROUP BY owner_user_id
     </select>
 
@@ -28,7 +28,7 @@
             #{userId}
         </foreach>
         AND return_time between #{times[0],javaType=java.time.LocalDateTime} and
-        #{times[1],javaType=java.time.LocalDateTime}
+            #{times[1],javaType=java.time.LocalDateTime}
         GROUP BY owner_user_id
     </select>
 
@@ -43,7 +43,7 @@
             #{userId}
         </foreach>
         AND order_date between #{times[0],javaType=java.time.LocalDateTime} and
-        #{times[1],javaType=java.time.LocalDateTime}
+            #{times[1],javaType=java.time.LocalDateTime}
         GROUP BY owner_user_id
     </select>
 
@@ -59,7 +59,7 @@
             #{userId}
         </foreach>
         AND order_date between #{times[0],javaType=java.time.LocalDateTime} and
-        #{times[1],javaType=java.time.LocalDateTime}
+            #{times[1],javaType=java.time.LocalDateTime}
         GROUP BY owner_user_id
     </select>
 
@@ -73,7 +73,7 @@
             #{userId}
         </foreach>
         AND create_time between #{times[0],javaType=java.time.LocalDateTime} and
-        #{times[1],javaType=java.time.LocalDateTime}
+            #{times[1],javaType=java.time.LocalDateTime}
         GROUP BY owner_user_id
     </select>
 
@@ -87,14 +87,15 @@
             #{userId}
         </foreach>
         AND create_time between #{times[0],javaType=java.time.LocalDateTime} and
-        #{times[1],javaType=java.time.LocalDateTime}
+            #{times[1],javaType=java.time.LocalDateTime}
         GROUP BY owner_user_id
     </select>
 
     <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
@@ -102,14 +103,15 @@
             #{userId}
         </foreach>
         AND cfur.create_time between #{times[0],javaType=java.time.LocalDateTime} and
-        #{times[1],javaType=java.time.LocalDateTime}
+            #{times[1],javaType=java.time.LocalDateTime}
         GROUP BY cc.owner_user_id
     </select>
 
     <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
@@ -117,7 +119,7 @@
             #{userId}
         </foreach>
         AND cfur.create_time between #{times[0],javaType=java.time.LocalDateTime} and
-        #{times[1],javaType=java.time.LocalDateTime}
+            #{times[1],javaType=java.time.LocalDateTime}
         GROUP BY cc.owner_user_id
     </select>