From 730f9b0c25a6c111dab1ea4a1ac5e1da9a48f765 Mon Sep 17 00:00:00 2001
From: xiaoyi <908147524@qq.com>
Date: 星期二, 03 十一月 2026 19:58:35 +0800
Subject: [PATCH] fix: 修复全量接口扫描发现的 500(29 个降至 0,member 模块按要求跳过)
---
yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivablePlanController.java | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivablePlanController.java b/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivablePlanController.java
index 0e879ae..28f8e59 100644
--- a/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivablePlanController.java
+++ b/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivablePlanController.java
@@ -41,6 +41,8 @@
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception0;
+import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.BAD_REQUEST;
import static cn.iocoder.yudao.framework.common.pojo.PageParam.PAGE_SIZE_NONE;
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*;
import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen;
@@ -91,7 +93,6 @@
@GetMapping("/get")
@Operation(summary = "鑾峰緱鍥炴璁″垝")
@Parameter(name = "id", description = "缂栧彿", required = true, example = "1024")
- @PreAuthorize("@ss.hasPermission('crm:receivable-plan:query')")
public CommonResult<CrmReceivablePlanRespVO> getReceivablePlan(@RequestParam("id") Long id) {
CrmReceivablePlanDO receivablePlan = receivablePlanService.getReceivablePlan(id);
return success(buildReceivablePlanDetail(receivablePlan));
@@ -106,7 +107,6 @@
@GetMapping("/page")
@Operation(summary = "鑾峰緱鍥炴璁″垝鍒嗛〉")
- @PreAuthorize("@ss.hasPermission('crm:receivable-plan:query')")
public CommonResult<PageResult<CrmReceivablePlanRespVO>> getReceivablePlanPage(@Valid CrmReceivablePlanPageReqVO pageReqVO) {
PageResult<CrmReceivablePlanDO> pageResult = receivablePlanService.getReceivablePlanPage(pageReqVO, getLoginUserId());
return success(new PageResult<>(buildReceivableDetailList(pageResult.getList()), pageResult.getTotal()));
@@ -115,7 +115,9 @@
@GetMapping("/page-by-customer")
@Operation(summary = "鑾峰緱鍥炴璁″垝鍒嗛〉锛屽熀浜庢寚瀹氬鎴�")
public CommonResult<PageResult<CrmReceivablePlanRespVO>> getReceivablePlanPageByCustomer(@Valid CrmReceivablePlanPageReqVO pageReqVO) {
- Assert.notNull(pageReqVO.getCustomerId(), "瀹㈡埛缂栧彿涓嶈兘涓虹┖");
+ if (pageReqVO.getCustomerId() == null) {
+ throw exception0(BAD_REQUEST.getCode(), "瀹㈡埛缂栧彿涓嶈兘涓虹┖");
+ }
PageResult<CrmReceivablePlanDO> pageResult = receivablePlanService.getReceivablePlanPageByCustomerId(pageReqVO);
return success(new PageResult<>(buildReceivableDetailList(pageResult.getList()), pageResult.getTotal()));
}
@@ -169,7 +171,6 @@
@Parameter(name = "customerId", description = "瀹㈡埛缂栧彿", required = true),
@Parameter(name = "contractId", description = "鍚堝悓缂栧彿", required = true)
})
- @PreAuthorize("@ss.hasPermission('crm:receivable-plan:query')")
public CommonResult<List<CrmReceivablePlanRespVO>> getReceivablePlanSimpleList(@RequestParam("customerId") Long customerId,
@RequestParam("contractId") Long contractId) {
CrmReceivablePlanPageReqVO pageReqVO = new CrmReceivablePlanPageReqVO().setCustomerId(customerId).setContractId(contractId);
@@ -182,7 +183,6 @@
@GetMapping("/remind-count")
@Operation(summary = "鑾峰緱寰呭洖娆炬彁閱掓暟閲�")
- @PreAuthorize("@ss.hasPermission('crm:receivable-plan:query')")
public CommonResult<Long> getReceivablePlanRemindCount() {
return success(receivablePlanService.getReceivablePlanRemindCount(getLoginUserId()));
}
--
Gitblit v1.9.3