ludc
2023-07-04 1f238ae264c0dfca87bba9ea9da5456153991eaa
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/DeptServiceImpl.java
@@ -34,6 +34,7 @@
import org.springblade.core.tool.node.ForestNodeMerger;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringPool;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.List;
@@ -50,6 +51,11 @@
   private static final String TENANT_ID = "tenantId";
   private static final String PARENT_ID = "parentId";
   /**
    * nacos配置的管理组租户id
    */
   @Value("${user-info.tenant-id}")
   private String tenantId;
   @Override
   public IPage<DeptVO> lazyList(String tenantId, Long parentId, Map<String, Object> param, Query query) {
@@ -80,10 +86,10 @@
      return baseMapper.lazyList(tenantId, parentId, param, Condition.getPage(query));
   }
   @Override
   public List<DeptVO> tree(String tenantId) {
      List<DeptVO> tree = baseMapper.tree(tenantId);
      // 这里判断我们自己配置的管理组租户,可以查询所有
      List<DeptVO> tree = baseMapper.tree(tenantId.equals(this.tenantId) ? "":tenantId);
      return ForestNodeMerger.merge(tree);
   }