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
|
@Override
|
||||||
public List<DeptDto> queryAll(DeptQueryCriteria criteria, Boolean isQuery) throws Exception {
|
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();
|
String dataScopeType = SecurityUtils.getDataScopeType();
|
||||||
if (isQuery) {
|
if (isQuery) {
|
||||||
if(dataScopeType.equals(DataScopeEnum.ALL.getValue())){
|
if(dataScopeType.equals(DataScopeEnum.ALL.getValue())){
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class MenuServiceImpl implements MenuService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<MenuDto> queryAll(MenuQueryCriteria criteria, Boolean isQuery) throws Exception {
|
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){
|
if(isQuery){
|
||||||
criteria.setPidIsNull(true);
|
criteria.setPidIsNull(true);
|
||||||
List<Field> fields = QueryHelp.getAllFields(criteria.getClass(), new ArrayList<>());
|
List<Field> fields = QueryHelp.getAllFields(criteria.getClass(), new ArrayList<>());
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class RoleServiceImpl implements RoleService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RoleDto> queryAll() {
|
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));
|
return roleMapper.toDto(roleRepository.findAll(sort));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue