diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/basic/BasicUnitMaintainController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/basic/BasicUnitMaintainController.java index 80f12d44..eaad0cd2 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/basic/BasicUnitMaintainController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/basic/BasicUnitMaintainController.java @@ -141,7 +141,10 @@ public class BasicUnitMaintainController { @AuthRuleAnnotation("") @PostMapping("/udiwms/basic/unit/maintain/update") - public BaseResponse update(@RequestBody @Valid BasicUnitMaintainEntity basicUnitMaintainSaveRequest) { + public BaseResponse update(@RequestBody @Valid BasicUnitMaintainEntity basicUnitMaintainSaveRequest,BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } basicUnitMaintainService.updateById(basicUnitMaintainSaveRequest); return ResultVOUtils.success("修改成功"); }