Browse Source

Merge remote-tracking branch 'origin/master'

master
PoffyZhang 1 year ago
parent
commit
d6b3dff03c
2 changed files with 4 additions and 1 deletions
  1. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/App.java
  2. +2
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/util/TreeUtil.java

+ 2
- 0
pmapi/src/main/java/com/ningdatech/pmapi/App.java View File

@@ -7,6 +7,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
@@ -21,6 +22,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableScheduling
@EnableTransactionManagement
@EnableAspectJAutoProxy(exposeProxy = true)
@ComponentScan(basePackages = {"com.ningdatech.pmapi", "com.ningdatech.irs"})
public class App {

protected static final String MAPPER_PACKAGES = "com.ningdatech.pmapi.**.mapper";


+ 2
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/util/TreeUtil.java View File

@@ -2,6 +2,7 @@ package com.ningdatech.pmapi.common.util;


import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import com.google.common.collect.Maps;
import com.ningdatech.basic.util.CollUtils;
import com.ningdatech.basic.util.StrPool;
@@ -145,7 +146,7 @@ public final class TreeUtil {
} else {
menus = new ArrayList<>(currMenus);
}
menus.sort(Comparator.comparing(MenuRoleVO::getSort));
menus.sort(Comparator.comparing(w -> ObjectUtil.defaultIfNull(w.getSort(), 99)));
ListIterator<MenuRoleVO> currIter = menus.listIterator();
while (currIter.hasNext()) {
MenuRoleVO curr = currIter.next();


Loading…
Cancel
Save