|
|
@ -64,19 +64,14 @@ public class AuthAdminController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
authAdminQueryRequest.setIds(ids);
|
|
|
|
authAdminQueryRequest.setIds(ids);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
authAdminQueryRequest.setNeUserName("admin");
|
|
|
|
List<AuthAdmin> authAdmins = authAdminService.listAdminPage(authAdminQueryRequest);
|
|
|
|
List<AuthAdmin> authAdmins = authAdminService.listAdminPage(authAdminQueryRequest);
|
|
|
|
List<AuthAdmin> authAdminList = new ArrayList<>();
|
|
|
|
|
|
|
|
for (AuthAdmin authAdmin : authAdmins) {
|
|
|
|
|
|
|
|
if (!authAdmin.getUserName().equals("admin")) {
|
|
|
|
|
|
|
|
authAdminList.add(authAdmin);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询所有的权限
|
|
|
|
// 查询所有的权限
|
|
|
|
List<Long> adminIds = authAdminList.stream().map(AuthAdmin::getId).collect(Collectors.toList());
|
|
|
|
List<Long> adminIds = authAdmins.stream().map(AuthAdmin::getId).collect(Collectors.toList());
|
|
|
|
List<AuthRoleAdmin> authRoleAdminList = authRoleAdminService.listByAdminIdIn(adminIds);
|
|
|
|
List<AuthRoleAdmin> authRoleAdminList = authRoleAdminService.listByAdminIdIn(adminIds);
|
|
|
|
|
|
|
|
|
|
|
|
// 视图列表
|
|
|
|
// 视图列表
|
|
|
|
List<AuthAdminResponse> authAdminResponseList = authAdminList.stream().map(item -> {
|
|
|
|
List<AuthAdminResponse> authAdminResponseList = authAdmins.stream().map(item -> {
|
|
|
|
AuthAdminResponse authAdminResponse = new AuthAdminResponse();
|
|
|
|
AuthAdminResponse authAdminResponse = new AuthAdminResponse();
|
|
|
|
BeanUtils.copyProperties(item, authAdminResponse);
|
|
|
|
BeanUtils.copyProperties(item, authAdminResponse);
|
|
|
|
List<Long> roles = authRoleAdminList.stream()
|
|
|
|
List<Long> roles = authRoleAdminList.stream()
|
|
|
@ -87,13 +82,11 @@ public class AuthAdminController {
|
|
|
|
return authAdminResponse;
|
|
|
|
return authAdminResponse;
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
|
|
PageInfo<AuthAdmin> authAdminPageInfo = new PageInfo<>(authAdminList);
|
|
|
|
PageInfo<AuthAdmin> authAdminPageInfo = new PageInfo<>(authAdmins);
|
|
|
|
PageSimpleResponse<AuthAdminResponse> authAdminPageSimpleResponse = new PageSimpleResponse<>();
|
|
|
|
PageSimpleResponse<AuthAdminResponse> authAdminPageSimpleResponse = new PageSimpleResponse<>();
|
|
|
|
authAdminPageSimpleResponse.setTotal(authAdminPageInfo.getTotal());
|
|
|
|
authAdminPageSimpleResponse.setTotal(authAdminPageInfo.getTotal());
|
|
|
|
authAdminPageSimpleResponse.setList(authAdminResponseList);
|
|
|
|
authAdminPageSimpleResponse.setList(authAdminResponseList);
|
|
|
|
|
|
|
|
|
|
|
|
return ResultVOUtils.success(authAdminPageSimpleResponse);
|
|
|
|
return ResultVOUtils.success(authAdminPageSimpleResponse);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|