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();