linwe
2023-12-01 5d5cd3ad979a0b85ab8c7034dcad1663fdcf71be
src/main/java/org/springblade/modules/system/service/impl/MenuServiceImpl.java
@@ -108,16 +108,6 @@
   public static final List<Integer> list1 = Arrays.asList(1, 2, 3, 4, 5, 6, 11, null);
   public static final List<Integer> list2 = Arrays.asList(1, 11, null);
   /**
    * apache测试方法
    */
   public static void main(String[] args) {
      System.out.println("交集:" + CollectionUtils.intersection(list1, list2)); // 交集
      System.out.println("补集:" + CollectionUtils.disjunction(list1, list2)); // 补集
      System.out.println("并集:" + CollectionUtils.union(list1, list2)); // 并集
      System.out.println("list1的差集:" + CollectionUtils.subtract(list1, list2)); // list1的差集
      System.out.println("list2的差集:" + CollectionUtils.subtract(list2, list1)); // list2的差集
   }
   @Override
   public List<MenuVO> routes(String roleId, Long topMenuId, Integer labelType) {
@@ -146,6 +136,28 @@
                  List<Integer> integerList = Arrays.stream(split).map(Integer::valueOf).collect(Collectors.toList());
                  Collection<? extends Serializable> union = CollectionUtils.intersection(integerList, integers);
                  if (union.size() == 0) {
                     iterator.remove();
                  }
               } else {
                  if (next.getName().trim().equals("标签报事")) {
                     iterator.remove();
                  }
                  if (next.getName().trim().equals("取保候审")) {
                     iterator.remove();
                  }
                  if (next.getName().trim().equals("打金店")) {
                     iterator.remove();
                  }
                  if (next.getName().trim().equals("旅馆安全")) {
                     iterator.remove();
                  }
                  if (next.getName().trim().equals("二手车交易")) {
                     iterator.remove();
                  }
                  if (next.getName().trim().equals("二手手机维修")) {
                     iterator.remove();
                  }
                  if (next.getName().trim().equals("校园安全")) {
                     iterator.remove();
                  }
               }
@@ -360,7 +372,7 @@
      List<List<String>> labelList = menu.getLabelList();
      StringBuffer stringBuffer = new StringBuffer();
      for (List<String> strings : labelList) {
         stringBuffer.append(strings.get(2)).append(",");
         stringBuffer.append(strings.get(strings.size()-1)).append(",");
      }
      menu.setLabelId(stringBuffer.toString());
      menu.setIsDeleted(BladeConstant.DB_NOT_DELETED);