From 9e095f66c1547e4af8a0b21e2276187cd5d4b2a0 Mon Sep 17 00:00:00 2001 From: Administrator <zhubaomin> Date: 星期五, 29 十二月 2023 14:07:53 +0800 Subject: [PATCH] 2023-12-29 朱宝民 去除三个子模块的Swagger参数注解 --- pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/clientType/ClientTypeCtrl.java | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/clientType/ClientTypeCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/clientType/ClientTypeCtrl.java index 74829e8..01a550a 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/clientType/ClientTypeCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/clientType/ClientTypeCtrl.java @@ -9,7 +9,6 @@ import com.dy.pipIrrBase.user.QueryVo; import com.dy.pipIrrGlobal.pojoBa.BaClientType; import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; @@ -79,7 +78,7 @@ }) @PostMapping(path = "some", consumes = MediaType.APPLICATION_JSON_VALUE) @SsoAop() - public BaseResponse<QueryResultVo<List<BaClientType>>> some(@RequestBody @Parameter(description = "鏌ヨform琛ㄥ崟json鏁版嵁", required = true) @Valid QueryVo vo){ + public BaseResponse<QueryResultVo<List<BaClientType>>> some(@RequestBody @Valid QueryVo vo){ try { QueryResultVo<List<BaClientType>> res = this.sv.selectSome(vo) ; return BaseResponseUtils.buildSuccess(res); @@ -104,7 +103,7 @@ }) @GetMapping(path = "one", consumes = MediaType.TEXT_PLAIN_VALUE) @SsoAop() - public BaseResponse<BaClientType> one(@Parameter(description = "瀹炰綋id", required = true) Long id){ + public BaseResponse<BaClientType> one(Long id){ return BaseResponseUtils.buildSuccess(this.sv.selectById(id)); } @@ -124,7 +123,7 @@ }) @PostMapping(path = "save", consumes = MediaType.APPLICATION_JSON_VALUE) @SsoAop() - public BaseResponse<Boolean> save(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid BaClientType po, @Parameter(hidden = true) BindingResult bindingResult){ + public BaseResponse<Boolean> save(@RequestBody @Valid BaClientType po, BindingResult bindingResult){ if(bindingResult != null && bindingResult.hasErrors()){ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); } @@ -159,7 +158,7 @@ }) @PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE) @SsoAop() - public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid BaClientType po, @Parameter(hidden = true) BindingResult bindingResult){ + public BaseResponse<Boolean> update(@RequestBody @Valid BaClientType po, BindingResult bindingResult){ if(bindingResult != null && bindingResult.hasErrors()){ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); } @@ -197,7 +196,7 @@ }) @GetMapping(path = "delete", consumes = MediaType.TEXT_PLAIN_VALUE) @SsoAop() - public BaseResponse<Boolean> delete(@Parameter(description = "瀹炰綋id", required = true) Long id){ + public BaseResponse<Boolean> delete(Long id){ if(id == null){ return BaseResponseUtils.buildFail("id涓嶈兘涓虹┖") ; } -- Gitblit v1.8.0