Kaynağa Gözat

提供单个查询接口

18482106067 2 yıl önce
ebeveyn
işleme
afff362c70

+ 9 - 0
sckw-modules-api/sckw-system-api/src/main/java/com/sckw/system/api/RemoteSystemService.java

@@ -130,6 +130,15 @@ public interface RemoteSystemService {
      */
     Map<Long, EntCacheResDto> queryEntTreeByIds(List<Long> entIdList);
 
+    /**
+     * @param entId 企业id
+     * @return EntCacheResDto
+     * @desc: 查企业树
+     * @author: czh
+     * @date: 2023/7/17
+     */
+    EntCacheResDto queryEntTreeById(Long entId);
+
     /**
      * @param userId 用户id
      * @return UserCacheResDto

+ 9 - 0
sckw-modules/sckw-system/src/main/java/com/sckw/system/dubbo/RemoteSystemServiceImpl.java

@@ -332,6 +332,15 @@ public class RemoteSystemServiceImpl implements RemoteSystemService {
         return result;
     }
 
+    @Override
+    public EntCacheResDto queryEntTreeById(Long entId) {
+        Map<Long, EntCacheResDto> longEntCacheResDtoMap = queryEntTreeByIds(Collections.singletonList(entId));
+        if (longEntCacheResDtoMap.isEmpty()) {
+            return null;
+        }
+        return longEntCacheResDtoMap.get(entId);
+    }
+
     @Override
     public List<EntCacheResDto> queryEntCacheByIds(List<Long> entIds) {
         if (CollectionUtils.isEmpty(entIds)) {