diff --git a/src/main/java/com/glxp/api/controller/auth/AuthAdminController.java b/src/main/java/com/glxp/api/controller/auth/AuthAdminController.java index 05e8769d..63924439 100644 --- a/src/main/java/com/glxp/api/controller/auth/AuthAdminController.java +++ b/src/main/java/com/glxp/api/controller/auth/AuthAdminController.java @@ -169,6 +169,28 @@ public class AuthAdminController { } + @AuthRuleAnnotation("admin/auth/admin/customerRoles") + @GetMapping("/admin/auth/admin/customerRolesList") + public BaseResponse customerRolesList(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "100") Integer limit) { + + List authRoleList = authRoleService.listCustomerRoles(page, limit, 1); +// List authRoleList = authRoleService.listAuthRoles2(page, limit); + PageInfo pageInfo = new PageInfo<>(authRoleList); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + List authAdminRoleResponses = authRoleList.stream().map(e -> { + AuthAdminRoleResponse authAdminRoleResponse = new AuthAdminRoleResponse(); + BeanUtils.copyProperties(e, authAdminRoleResponse); + return authAdminRoleResponse; + }).collect(Collectors.toList()); + pageSimpleResponse.setList(authAdminRoleResponses); + + return ResultVOUtils.success(pageSimpleResponse); + } + + + /** * 新增 * diff --git a/src/main/java/com/glxp/api/service/auth/impl/AuthRoleServiceImpl.java b/src/main/java/com/glxp/api/service/auth/impl/AuthRoleServiceImpl.java index 8b5f8411..251b0fb4 100644 --- a/src/main/java/com/glxp/api/service/auth/impl/AuthRoleServiceImpl.java +++ b/src/main/java/com/glxp/api/service/auth/impl/AuthRoleServiceImpl.java @@ -99,7 +99,7 @@ public class AuthRoleServiceImpl implements AuthRoleService { limit = limit != null && limit > 0 && limit < 100 ? limit : 100; int offset = (page - 1) * limit; PageHelper.offsetPage(offset, limit); - List list = authRoleDao.getCustomerRoles(isCustomer); + List list = authRoleDao.listCustomerRoles(isCustomer); return list; }