Update MenuServiceImpl.java (#656)

防止isQuery为空时自动拆箱出现NullPointerException
pull/671/head
yuyu1025 2021-07-19 14:21:07 +08:00 committed by GitHub
parent 12a7e033f2
commit 6c75df558e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ public class MenuServiceImpl implements MenuService {
@Override
public List<MenuDto> queryAll(MenuQueryCriteria criteria, Boolean isQuery) throws Exception {
Sort sort = Sort.by(Sort.Direction.ASC, "menuSort");
if(isQuery){
if(Boolean.TRUE.equals(isQuery)){
criteria.setPidIsNull(true);
List<Field> fields = QueryHelp.getAllFields(criteria.getClass(), new ArrayList<>());
for (Field field : fields) {