| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | |
| | | schema = @Schema(implementation = BaRole.class))} |
| | | ) |
| | | }) |
| | | @PostMapping(path = "all") |
| | | @GetMapping(path = "all") |
| | | @SsoAop("-1") |
| | | public BaseResponse<QueryResultVo<List<BaRole>>> all(QueryVo vo){ |
| | | public BaseResponse<QueryResultVo<List<BaRole>>> all(){ |
| | | try { |
| | | QueryResultVo<List<BaRole>> res = this.sv.selectAll(vo) ; |
| | | QueryResultVo<List<BaRole>> res = this.sv.selectAll() ; |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } catch (Exception e) { |
| | | log.error("查询角色异常", e); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 客户端请求得到所有角色数据 |
| | | * 客户端请求得到一页角色数据 |
| | | * @return 所有角色数据 |
| | | */ |
| | | @Operation(summary = "获得一页角色", description = "返回一页角色数据") |
| | |
| | | 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(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); |