...
|
...
|
@@ -103,20 +103,20 @@ public class ModuleCtrl { |
|
|
|
|
|
@RequestMapping("/getAuthModules")
|
|
|
@ResponseBody
|
|
|
public BaseResponse<PageResponse<AuthModule>> getAuthModules(@RequestBody PageRequest req) {
|
|
|
public BaseResponse<PageResponse<AuthModule>> getAuthModules(@RequestBody PageRequest req,String keys) {
|
|
|
try{
|
|
|
// 组装分页对象
|
|
|
PageBean page = PageBean.initPageInfo(req.getCurrentPage(),
|
|
|
req.getPageSize(), req);
|
|
|
// 先查询符合条件的总数量
|
|
|
int total = authModuleMapper.selectCount();
|
|
|
int total = authModuleMapper.selectCount(keys);
|
|
|
// 数量为0 直接返回
|
|
|
if (total == 0) {
|
|
|
// 返回初始page对象
|
|
|
return null;
|
|
|
}
|
|
|
// 获取列表
|
|
|
List<AuthModule> authModules = authModuleMapper.selectAuthModules(page);
|
|
|
List<AuthModule> authModules = authModuleMapper.selectAuthModules(page.getStartIndex(),page.getPageSize(),keys);
|
|
|
if (CollectionUtils.isEmpty(authModules)) {
|
|
|
log.debug("getAuthModules is null with param is {}", req);
|
|
|
return null;
|
...
|
...
|
|