From 9cceef75bb31e58f30b428ff7612ec9050bddec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E9=B9=8F=E9=A3=9E?= Date: Wed, 13 May 2026 09:01:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(app):=20=E7=BB=9F=E4=B8=80=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF=E4=B8=BA=E2=80=9C?= =?UTF-8?q?=E8=AF=B7=E8=81=94=E7=B3=BB=E7=AE=A1=E7=90=86=E5=91=98=E4=B8=BA?= =?UTF-8?q?=E6=82=A8=E5=BC=80=E6=94=BE=E6=9D=83=E9=99=90=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将AppRatioAgentConfigController中所有涉及权限提示的消息由“请联系管理员为你设置”修改为“请联系管理员为您开放权限” - PlanController中为setDefaultRatio接口添加@Min(1)参数校验,确保传入系数不小于1 - ShoppingController中修改权限相关提示信息,统一为“请联系管理员为您开放权限” - 优化用户权限提示语句,提升用户体验和表述一致性 --- .../controller/app/AppRatioAgentConfigController.java | 8 ++++---- .../quotation/controller/app/PlanController.java | 3 ++- .../quotation/controller/app/ShoppingController.java | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/AppRatioAgentConfigController.java b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/AppRatioAgentConfigController.java index 93a86ec4..84a22638 100644 --- a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/AppRatioAgentConfigController.java +++ b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/AppRatioAgentConfigController.java @@ -94,7 +94,7 @@ public class AppRatioAgentConfigController extends ControllerBase { */ @PostMapping("config/search") public ApiResult>> search(@Valid @RequestBody ModelConfigSearchRequest request) { - VUtils.trueThrowBusinessError(!ratioAgentItemService.hasConfig(AppUserUtil.getUserId())).throwMessage("请联系管理员为你设置系数"); + VUtils.trueThrowBusinessError(!ratioAgentItemService.hasConfig(AppUserUtil.getUserId())).throwMessage("请联系管理员为您开放权限"); QuotationModelRatioAgent ratioAgent = ratioAgentService.lambdaQuery() .eq(QuotationModelRatioAgent::getStatus, 1) .eq(QuotationModelRatioAgent::getCreateByType, 1) @@ -109,7 +109,7 @@ public class AppRatioAgentConfigController extends ControllerBase { .list(); AppUser cuser = appUserService.getById(AppUserUtil.getUserId()); DictionaryItem category = appUserService.getCategory(cuser); - VUtils.trueThrowBusinessError(Objects.isNull(category)).throwMessage("请联系管理员为你设置区域类型"); + VUtils.trueThrowBusinessError(Objects.isNull(category)).throwMessage("请联系管理员为您开放权限"); List users = appUserService.getChildren(cuser); List prices = priceService.getAllModelPrice(); PageData> mdatas = new PageData<>(); @@ -247,10 +247,10 @@ public class AppRatioAgentConfigController extends ControllerBase { */ @PostMapping("list/search") public ApiResult> search(@Valid @RequestBody ModelRatioUserSearchRequest request) { - VUtils.trueThrowBusinessError(!ratioAgentItemService.hasConfig(AppUserUtil.getUserId())).throwMessage("请联系管理员为你设置系数"); + VUtils.trueThrowBusinessError(!ratioAgentItemService.hasConfig(AppUserUtil.getUserId())).throwMessage("请联系管理员为您开放权限"); AppUser cuser = appUserService.getById(AppUserUtil.getUserId()); DictionaryItem category = appUserService.getCategory(cuser); - VUtils.trueThrowBusinessError(Objects.isNull(category)).throwMessage("请联系管理员为你设置区域类型"); + VUtils.trueThrowBusinessError(Objects.isNull(category)).throwMessage("请联系管理员为您开放权限"); List plans = planModelItemService.getEffectivesForAgent(); List items = ratioAgentItemService.getEffectiveByCreate(AppUserUtil.getUserId()); if (Objects.isNull(request.getUserId())) { diff --git a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/PlanController.java b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/PlanController.java index 28629637..6e3c8315 100644 --- a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/PlanController.java +++ b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/PlanController.java @@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.validation.Valid; +import javax.validation.constraints.Min; import javax.validation.constraints.NotEmpty; import java.math.BigDecimal; import java.time.LocalDate; @@ -75,7 +76,7 @@ public class PlanController extends ControllerBase { * 设置方案默认系数 */ @PostMapping("/setDefaultRatio") - public ApiResult setDefaultRatio(@RequestParam BigDecimal ratio) { + public ApiResult setDefaultRatio(@RequestParam @Min(1) BigDecimal ratio) { QuotationUserPlanDefault planDefault = planDefaultService.lambdaQuery() .eq(QuotationUserPlanDefault::getCreateByType, AppUserUtil.isAgent() ? 1 : 0) .eq(QuotationUserPlanDefault::getCreateById, AppUserUtil.getUserId()) diff --git a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/ShoppingController.java b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/ShoppingController.java index 51524efd..16b46a38 100644 --- a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/ShoppingController.java +++ b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/ShoppingController.java @@ -156,7 +156,7 @@ public class ShoppingController extends ControllerBase { @PostMapping("/cart/init") public ApiResult init(@Valid @RequestBody ShoppingInitRequest request) { String qc = getQuotationCode(); - VUtils.trueThrowBusinessError(StrUtil.isBlank(qc)).throwMessage("请联系管理员为你设置报价代码"); + VUtils.trueThrowBusinessError(StrUtil.isBlank(qc)).throwMessage("请联系管理员为您开放权限"); Long categoryId = getCategoryId(); ProductModel model = productModelService.lambdaQuery().eq(ProductModel::getState, 1).eq(ProductModel::getNo, request.getModelNo()).one(); VUtils.trueThrowBusinessError(Objects.isNull(model)).throwMessage("未找到该机型"); @@ -930,7 +930,7 @@ public class ShoppingController extends ControllerBase { private Long getCategoryId() { if (AppUserUtil.isAgent()) { DictionaryItem di = appUserService.getCategory(appUserService.getById(AppUserUtil.getUserId())); - VUtils.trueThrowBusinessError(Objects.isNull(di)).throwMessage("请联系管理员设置区域类别"); + VUtils.trueThrowBusinessError(Objects.isNull(di)).throwMessage("请联系管理员为您开放权限"); return di.getId(); } else { Long categoryId = adminUserService.getById(AppUserUtil.getUserId()).getCategoryId();