修改审核拉取角色问题

master
郑明梁 2 years ago
parent 5c95fd1c5f
commit f5be9675a4

@ -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<AuthRole> authRoleList = authRoleService.listCustomerRoles(page, limit, 1);
// List<AuthRole> authRoleList = authRoleService.listAuthRoles2(page, limit);
PageInfo<AuthRole> pageInfo = new PageInfo<>(authRoleList);
PageSimpleResponse<AuthAdminRoleResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
List<AuthAdminRoleResponse> 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);
}
/**
*
*

@ -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<AuthRole> list = authRoleDao.getCustomerRoles(isCustomer);
List<AuthRole> list = authRoleDao.listCustomerRoles(isCustomer);
return list;
}

Loading…
Cancel
Save