Skip to content

Commit

Permalink
在线用户查询优化,去除缓存管理模块,直接操作redis过于危险
Browse files Browse the repository at this point in the history
  • Loading branch information
elunez committed Nov 30, 2019
1 parent faa93f4 commit 4c90303
Show file tree
Hide file tree
Showing 8 changed files with 666 additions and 293 deletions.
2 changes: 0 additions & 2 deletions eladmin-common/src/main/java/me/zhengjie/utils/PageUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public class PageUtil extends cn.hutool.core.util.PageUtil {
public static List toPage(int page, int size , List list) {
int fromIndex = page * size;
int toIndex = page * size + size;

if(fromIndex > list.size()){
return new ArrayList();
} else if(toIndex >= list.size()) {
Expand All @@ -43,7 +42,6 @@ public static Map<String,Object> toPage(Object object, Object totalElements) {
Map<String,Object> map = new LinkedHashMap<>(2);
map.put("content",object);
map.put("totalElements",totalElements);

return map;
}

Expand Down
Loading

0 comments on commit 4c90303

Please sign in to comment.