zrj
2024-06-05 ec7bdc6eb25e45f9e84b99ab8a4ead05027b316a
blade-auth/src/main/java/org/springblade/system/wrapper/DeptWrapper.java
@@ -21,7 +21,7 @@
import org.springblade.core.tool.node.ForestNodeMerger;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.system.cache.DictCache;
import org.springblade.common.cache.DictCache;
import org.springblade.system.cache.SysCache;
import org.springblade.system.entity.Dept;
import org.springblade.system.enums.DictEnum;
@@ -51,7 +51,7 @@
         Dept parent = SysCache.getDept(dept.getParentId());
         deptVO.setParentName(parent.getDeptName());
      }
      String category = DictCache.getValue(DictEnum.ORG_CATEGORY, dept.getDeptCategory());
      String category = DictCache.getValue(DictEnum.ORG_CATEGORY.getName(), dept.getDeptCategory());
      deptVO.setDeptCategoryName(category);
      return deptVO;
   }
@@ -60,7 +60,7 @@
   public List<DeptVO> listNodeVO(List<Dept> list) {
      List<DeptVO> collect = list.stream().map(dept -> {
         DeptVO deptVO = BeanUtil.copy(dept, DeptVO.class);
         String category = DictCache.getValue(DictEnum.ORG_CATEGORY, dept.getDeptCategory());
         String category = DictCache.getValue(DictEnum.ORG_CATEGORY.getName(), dept.getDeptCategory());
         Objects.requireNonNull(deptVO).setDeptCategoryName(category);
         return deptVO;
      }).collect(Collectors.toList());
@@ -69,7 +69,7 @@
   public List<DeptVO> listNodeLazyVO(List<DeptVO> list) {
      List<DeptVO> collect = list.stream().peek(dept -> {
         String category = DictCache.getValue(DictEnum.ORG_CATEGORY, dept.getDeptCategory());
         String category = DictCache.getValue(DictEnum.ORG_CATEGORY.getName(), dept.getDeptCategory());
         Objects.requireNonNull(dept).setDeptCategoryName(category);
      }).collect(Collectors.toList());
      return ForestNodeMerger.merge(collect);