|
|
@@ -88,6 +88,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
|
|
if (role.getParams().get("beginTime") != null && role.getParams().get("endTime") != null) {
|
|
|
query.between("create_time", role.getParams().get("beginTime") + " 00:00:00", role.getParams().get("endTime") + " 23:59:59");
|
|
|
}
|
|
|
+ query.orderByAsc("role_sort");
|
|
|
page = roleMapper.selectPage(page, query);
|
|
|
return TableDataInfo.build(page);
|
|
|
}
|
|
|
@@ -489,6 +490,12 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
|
|
// }
|
|
|
list.add(sysRole);
|
|
|
}
|
|
|
+ list= list.stream().sorted(new Comparator<SysRole>() {//使用List接口的方法排序
|
|
|
+ @Override
|
|
|
+ public int compare(SysRole o1, SysRole o2) {
|
|
|
+ return o1.getRoleSort().compareTo(o2.getRoleSort());
|
|
|
+ }
|
|
|
+ }).collect(Collectors.toList());
|
|
|
clearRoleCache();
|
|
|
RedisUtils.setCacheList(CacheConstants.ROLE_CACHE_LIST_KEY, list);
|
|
|
}
|