mirror of https://github.com/elunez/eladmin
Spring Boot依赖升级后,Sort的设置方式调整。由 new Sort()改为 Sort.by()
parent
5c47c331fc
commit
4a8707d6ca
|
@ -58,7 +58,7 @@ public class DeptServiceImpl implements DeptService {
|
|||
|
||||
@Override
|
||||
public List<DeptDto> queryAll(DeptQueryCriteria criteria, Boolean isQuery) throws Exception {
|
||||
Sort sort = new Sort(Sort.Direction.ASC, "deptSort");
|
||||
Sort sort = Sort.by(Sort.Direction.ASC, "deptSort");
|
||||
String dataScopeType = SecurityUtils.getDataScopeType();
|
||||
if (isQuery) {
|
||||
if(dataScopeType.equals(DataScopeEnum.ALL.getValue())){
|
||||
|
@ -278,4 +278,4 @@ public class DeptServiceImpl implements DeptService {
|
|||
redisUtils.delByKeys(CacheKey.DATA_USER, users.stream().map(User::getId).collect(Collectors.toSet()));
|
||||
redisUtils.del(CacheKey.DEPT_ID + id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class MenuServiceImpl implements MenuService {
|
|||
|
||||
@Override
|
||||
public List<MenuDto> queryAll(MenuQueryCriteria criteria, Boolean isQuery) throws Exception {
|
||||
Sort sort = new Sort(Sort.Direction.ASC, "menuSort");
|
||||
Sort sort = Sort.by(Sort.Direction.ASC, "menuSort");
|
||||
if(isQuery){
|
||||
criteria.setPidIsNull(true);
|
||||
List<Field> fields = QueryHelp.getAllFields(criteria.getClass(), new ArrayList<>());
|
||||
|
|
|
@ -66,7 +66,7 @@ public class RoleServiceImpl implements RoleService {
|
|||
|
||||
@Override
|
||||
public List<RoleDto> queryAll() {
|
||||
Sort sort = new Sort(Sort.Direction.ASC, "level");
|
||||
Sort sort = Sort.by(Sort.Direction.ASC, "level");
|
||||
return roleMapper.toDto(roleRepository.findAll(sort));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue