From b20ff55511c2206a0b78d8081aeeb8e3895ecb3b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 18 Apr 2024 09:19:07 +0800 Subject: [PATCH] =?UTF-8?q?code=20review=EF=BC=9A=E9=94=80=E5=94=AE?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../statistics/CrmStatisticsFunnelMapper.xml | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml index f61b4dfc2..a07406259 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsFunnelMapper.xml @@ -3,19 +3,23 @@ - SELECT end_status AS endStatus,COUNT(*) AS businessCount, SUM(total_price) AS totalPrice + SELECT + end_status AS endStatus, + COUNT(*) AS businessCount, + SUM(total_price) AS totalPrice FROM crm_business WHERE deleted = 0 AND end_status IS NOT NULL AND owner_user_id IN @@ -46,9 +53,9 @@ SELECT - DATE_FORMAT(create_time, '%Y-%m-%d') AS time, - COUNT(*) AS businessCount, - SUM(IF(end_status = 1, 1, 0)) AS businessWinCount + DATE_FORMAT(create_time, '%Y-%m-%d') AS time, + COUNT(*) AS businessCount, + SUM(IF(end_status = 1, 1, 0)) AS businessWinCount FROM crm_business WHERE deleted = 0 AND owner_user_id IN