|
|
@@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @author czh
|
|
|
@@ -220,6 +221,15 @@ public class RemoteSystemServiceImpl implements RemoteSystemService {
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Map<Long, List<EntCacheResDto>> queryEntCacheMapByIds(List<Long> entIds) {
|
|
|
+ List<EntCacheResDto> entCacheResDtos = queryEntCacheByIds(entIds);
|
|
|
+ if (CollectionUtils.isEmpty(entCacheResDtos)) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ return entCacheResDtos.stream().collect(Collectors.groupingBy(EntCacheResDto::getId));
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public UserCacheResDto queryUserCacheById(Long userId) {
|
|
|
String key = Global.REDIS_USER_PREFIX + userId;
|
|
|
@@ -279,6 +289,15 @@ public class RemoteSystemServiceImpl implements RemoteSystemService {
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Map<Long, List<UserCacheResDto>> queryUserCacheMapByIds(List<Long> userIds) {
|
|
|
+ List<UserCacheResDto> userCacheResDtos = queryUserCacheByIds(userIds);
|
|
|
+ if (CollectionUtils.isEmpty(userCacheResDtos)) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ return userCacheResDtos.stream().collect(Collectors.groupingBy(UserCacheResDto::getId));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @param id 父id,需要遍历的list
|
|
|
* @return SysDictGroupResDto
|