From c4ce9068f9457b30131c860c0906cb55dc133bf0 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 7 Apr 2024 21:27:40 +0800 Subject: [PATCH] =?UTF-8?q?crm=EF=BC=9Acode=20review=20=E5=85=AC=E6=B5=B7?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/common/util/date/LocalDateTimeUtils.java | 7 +++---- .../admin/statistics/CrmStatisticsCustomerController.http | 3 --- .../admin/statistics/CrmStatisticsCustomerController.java | 4 ++-- .../dal/mysql/statistics/CrmStatisticsCustomerMapper.java | 1 - .../mapper/statistics/CrmStatisticsCustomerMapper.xml | 1 + 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java index 2648c88de..acc93ad8c 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java @@ -250,10 +250,9 @@ public class LocalDateTimeUtils { case DateIntervalEnum.QUARTER: while (startTime.isBefore(endTime)) { int quarterOfYear = getQuarterOfYear(startTime); - LocalDateTime quarterEnd = - quarterOfYear == 4 - ? startTime.with(TemporalAdjusters.lastDayOfYear()).plusDays(1).minusNanos(1) - : startTime.withMonth(quarterOfYear * 3 + 1).withDayOfMonth(1).minusNanos(1); + LocalDateTime quarterEnd = quarterOfYear == 4 + ? startTime.with(TemporalAdjusters.lastDayOfYear()).plusDays(1).minusNanos(1) + : startTime.withMonth(quarterOfYear * 3 + 1).withDayOfMonth(1).minusNanos(1); timeRanges.add(new LocalDateTime[]{startTime, quarterEnd}); startTime = quarterEnd.plusNanos(1); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http index 1882cae31..389bf4ac9 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.http @@ -9,7 +9,6 @@ GET {{baseUrl}}/crm/statistics-customer/get-customer-summary-by-user?deptId=100& Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} - # == 2. 客户跟进次数分析 == ### 2.1 客户跟进次数分析(按日期) GET {{baseUrl}}/crm/statistics-customer/get-follow-up-summary-by-date?deptId=100&interval=2×[0]=2024-01-01 00:00:00×[1]=2024-01-29 23:59:59 @@ -21,14 +20,12 @@ GET {{baseUrl}}/crm/statistics-customer/get-follow-up-summary-by-user?deptId=100 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} - # == 3. 客户跟进方式分析 == ### 3.1 客户跟进方式分析 GET {{baseUrl}}/crm/statistics-customer/get-follow-up-summary-by-type?deptId=100&interval=2×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 Authorization: Bearer {{token}} tenant-id: {{adminTenentId}} - # == 4. 客户成交周期 == ### 4.1 合同摘要信息(客户转化率页面) GET {{baseUrl}}/crm/statistics-customer/get-contract-summary?deptId=100&interval=2×[0]=2023-01-01 00:00:00×[1]=2024-12-12 23:59:59 diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java index ad7857f9a..51d149900 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java @@ -69,14 +69,14 @@ public class CrmStatisticsCustomerController { } @GetMapping("/get-pool-summary-by-date") - @Operation(summary = "获取客户成交周期(按日期)") + @Operation(summary = "获取公海客户分析(按日期)") @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") public CommonResult> getPoolSummaryByDate(@Valid CrmStatisticsCustomerReqVO reqVO) { return success(customerService.getPoolSummaryByDate(reqVO)); } @GetMapping("/get-pool-summary-by-user") - @Operation(summary = "获取客户成交周期(按用户)") + @Operation(summary = "获取公海客户分析(按用户)") @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") public CommonResult> getPoolSummaryByUser(@Valid CrmStatisticsCustomerReqVO reqVO) { return success(customerService.getPoolSummaryByUser(reqVO)); diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java index f520dddc4..458ef79c3 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java @@ -138,7 +138,6 @@ public interface CrmStatisticsCustomerMapper { return voList; } - /** * 公海领取客户数(按日期) * diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml index 7f8b36ba4..44c6c4b84 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml @@ -16,6 +16,7 @@ GROUP BY time +