Bladeren bron

fix 修改菜单顺序问题

pengzhenggao 1 week geleden
bovenliggende
commit
e9215b0b14

+ 2 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/util/TreeUtil.java

@@ -7,6 +7,7 @@ import java.util.stream.Collectors;
 
 import com.fuint.common.domain.TreeNode;
 import com.fuint.utils.StringUtil;
+import com.google.common.base.Objects;
 
 /**
  * 树形展示工具类
@@ -28,7 +29,7 @@ public class TreeUtil {
         for (TreeNode node1 : sourceTreeNodeList) {
             boolean mark = false;
             for (TreeNode node2 : sourceTreeNodeList) {
-                if (StringUtil.isNotEmpty(node1.getName()) && node1.getPId() == node2.getId()) {
+                if (StringUtil.isNotEmpty(node1.getName()) && Objects.equal(node1.getPId(),node2.getId())) {
                     mark = true;
                     if (node2.getChildrens() == null) {
                         node2.setChildrens(new ArrayList<>());

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCurrencyController.java

@@ -110,7 +110,7 @@ public class BackendCurrencyController extends BaseController {
     @ApiOperation(value = "获取全部的货币列表")
     @DeleteMapping("/allList")
     @CrossOrigin
-    @PreAuthorize("@pms.hasPermission('currency:allList')")
+    @PreAuthorize("@pms.hasPermission('currency:list')")
     public ResponseObject allList(@RequestParam(value = "name",defaultValue = "") String name) throws BusinessCheckException {
         List<CurrencyVo> result = currencyService.allList(name);
         return getSuccessResult(result);

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java

@@ -194,7 +194,7 @@ public class BackendSourceController extends BaseController {
 
         if (StringUtil.isNotBlank(parentId)) {
             try {
-                if (Integer.parseInt(parentId) > 0) {
+                if (Long.parseLong(parentId)> 0L) {
                     TSource parentSource = sourceService.getById(Long.parseLong(parentId));
                     editSource.setParentId(parentSource.getSourceId());
                     editSource.setSourceLevel(parentSource.getSourceLevel() + 1);