| | |
| | | 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 = BaUser.class))} |
| | | ) |
| | | }) |
| | | @PostMapping(path = "some") |
| | | @PostMapping(path = "some", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
| | | @SsoAop("-1") |
| | | public BaseResponse<QueryResultVo<List<BaUser>>> some(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); |
| | |
| | | @GetMapping(path = "setRoles", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
| | | @SsoAop("-1")//@SsoAop(power = "-1") |
| | | public BaseResponse<Boolean> setRoles(@Parameter(description = "实体id", required = true) String id, |
| | | @Parameter(description = "角色id数组集合") String[] roleIds){ |
| | | @Parameter(description = "角色id数组") String[] roleIds){ |
| | | Long[] roleId_lg = null ; |
| | | if(roleIds != null && roleIds.length > 0){ |
| | | roleId_lg = new Long[roleIds.length] ; |