| | |
| | | package com.dy.common.webUtil; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.*; |
| | | |
| | | @Data |
| | |
| | | * 当前查询页 |
| | | */ |
| | | @Schema(description = "当前页", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotEmpty(message = "当前页不能为空") //不能为空也不能为null |
| | | @NotNull(message = "当前页不能为空") //不能为空也不能为null |
| | | public Integer pageCurr ; |
| | | |
| | | /** |
| | | * 每页数据条数 |
| | | */ |
| | | @Schema(description = "每页记录数", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotEmpty(message = "每页记录数不能为空") //不能为空也不能为null |
| | | @NotNull(message = "每页记录数不能为空") //不能为空也不能为null |
| | | public Integer pageSize ; |
| | | |
| | | } |
| | |
| | | schema = @Schema(implementation = BaBlock.class))} |
| | | ) |
| | | }) |
| | | @PostMapping(path = "some") |
| | | @PostMapping(path = "some", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
| | | @SsoAop("-1") |
| | | public BaseResponse<QueryResultVo<List<BaBlock>>> some(@RequestBody @Parameter(description = "查询form表单数据", required = true) QueryVo vo){ |
| | | public BaseResponse<QueryResultVo<List<BaBlock>>> some(@Parameter(description = "查询form表单数据", required = true) QueryVo vo){ |
| | | try { |
| | | QueryResultVo<List<BaBlock>> res = this.sv.selectSome(vo) ; |
| | | return BaseResponseUtils.buildSuccess(res); |
| | |
| | | }) |
| | | @PostMapping(path = "save", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
| | | @SsoAop("-1")//@SsoAop(power = "-1") |
| | | public BaseResponse<Boolean> save(@RequestBody @Parameter(description = "form表单数据", required = true) @Valid BaBlock po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | public BaseResponse<Boolean> save(@Parameter(description = "form表单数据", required = true) @Valid BaBlock po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | |
| | | }) |
| | | @PostMapping(path = "update", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
| | | @SsoAop("-1")//@SsoAop(power = "-1") |
| | | public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form表单数据", required = true) @Valid BaBlock po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | public BaseResponse<Boolean> update(@Parameter(description = "form表单数据", required = true) @Valid BaBlock po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | |
| | | }) |
| | | @PostMapping(path = "save", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
| | | @SsoAop("-1")//@SsoAop(power = "-1") |
| | | public BaseResponse<Boolean> save(@RequestBody @Parameter(description = "form表单数据", required = true) @Valid DistrictVo vo, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | public BaseResponse<Boolean> save(@Parameter(description = "form表单数据", required = true) @Valid DistrictVo vo, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | |
| | | }) |
| | | @PostMapping(path = "update", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
| | | @SsoAop("-1")//@SsoAop(power = "-1") |
| | | public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form表单数据", required = true) @Valid DistrictVo vo, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | public BaseResponse<Boolean> update(@Parameter(description = "form表单数据", required = true) @Valid DistrictVo vo, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | |
| | | schema = @Schema(implementation = BaRole.class))} |
| | | ) |
| | | }) |
| | | @PostMapping(path = "some") |
| | | @PostMapping(path = "some", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
| | | @SsoAop("-1") |
| | | public BaseResponse<QueryResultVo<List<BaRole>>> some(@RequestBody @Parameter(description = "查询form表单数据", required = true) @Valid QueryVo vo){ |
| | | public BaseResponse<QueryResultVo<List<BaRole>>> some(@Parameter(description = "查询form表单数据", required = true) @Valid QueryVo vo){ |
| | | try { |
| | | QueryResultVo<List<BaRole>> res = this.sv.selectSome(vo) ; |
| | | return BaseResponseUtils.buildSuccess(res); |
| | |
| | | }) |
| | | @PostMapping(path = "save", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
| | | @SsoAop("-1")//@SsoAop(power = "-1") |
| | | public BaseResponse<Boolean> save(@RequestBody @Parameter(description = "form表单数据", required = true) @Valid BaRole po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | public BaseResponse<Boolean> save(@Parameter(description = "form表单数据", required = true) @Valid BaRole po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | |
| | | }) |
| | | @PostMapping(path = "update", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
| | | @SsoAop("-1")//@SsoAop(power = "-1") |
| | | public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form表单数据", required = true) @Valid BaRole po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | public BaseResponse<Boolean> update(@Parameter(description = "form表单数据", required = true) @Valid BaRole po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | |
| | | schema = @Schema(implementation = BaUser.class))} |
| | | ) |
| | | }) |
| | | @PostMapping(path = "some") |
| | | @PostMapping(path = "some", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
| | | @SsoAop("-1") |
| | | public BaseResponse<QueryResultVo<List<BaUser>>> some(@RequestBody @Parameter(description = "查询form表单数据", required = true) @Valid QueryVo vo){ |
| | | //如果前端请求数据是json,则要加上注解@RequestBody |
| | | //public BaseResponse<QueryResultVo<List<BaUser>>> some(@RequestBody @Parameter(description = "查询form表单数据", required = true) @Valid QueryVo vo){ |
| | | public BaseResponse<QueryResultVo<List<BaUser>>> some(@Parameter(description = "查询form表单数据", required = true) @Valid QueryVo vo){ |
| | | try { |
| | | QueryResultVo<List<BaUser>> res = this.sv.selectSome(vo) ; |
| | | return BaseResponseUtils.buildSuccess(res); |
| | |
| | | }) |
| | | @PostMapping(path = "save", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
| | | @SsoAop("-1")//@SsoAop(power = "-1") |
| | | public BaseResponse<Boolean> save(@RequestBody @Parameter(description = "form表单数据", required = true) @Valid BaUser po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | public BaseResponse<Boolean> save(@Parameter(description = "form表单数据", required = true) @Valid BaUser po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | |
| | | }) |
| | | @PostMapping(path = "update", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
| | | @SsoAop("-1")//@SsoAop(power = "-1") |
| | | public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form表单数据", required = true) @Valid BaUser po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | public BaseResponse<Boolean> update(@Parameter(description = "form表单数据", required = true) @Valid BaUser po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |