部门查询添加查询条件,可以传入多orgId查询
This commit is contained in:
@ -98,12 +98,17 @@ public class SysOrgController{
|
|||||||
*/
|
*/
|
||||||
@ApiOperation("查询列表数据")
|
@ApiOperation("查询列表数据")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public BaseResponse<List<SysOrg>> list(@ApiParam(value = "查询对象数据", required = false) SysOrg param) {
|
public BaseResponse<List<SysOrg>> list(@ApiParam(value = "查询对象数据", required = false) SysOrgVO param) {
|
||||||
//查询
|
//查询
|
||||||
LambdaQueryWrapper<SysOrg> query = Wrappers.lambdaQuery(param);
|
LambdaQueryWrapper<SysOrg> query = Wrappers.lambdaQuery(param);
|
||||||
|
|
||||||
|
// 处理多orgId查询条件
|
||||||
|
if (param.getAllDepartmentId() != null && !param.getAllDepartmentId().trim().isEmpty()) {
|
||||||
|
String[] orgIds = param.getAllDepartmentId().split(",");
|
||||||
|
query.in(SysOrg::getOrgId, orgIds);
|
||||||
|
}
|
||||||
|
|
||||||
List<SysOrg> list = iSysOrgService.list(query);
|
List<SysOrg> list = iSysOrgService.list(query);
|
||||||
//异常处理
|
|
||||||
//RespsExceptionEnum.FRAME_EXCEPTION_DEMO_NOT_FIND.customValid(list.isEmpty());
|
|
||||||
return BaseResponse.success(list);
|
return BaseResponse.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user