|
|
@@ -75,7 +75,7 @@ public class RemoteSystemServiceImpl implements RemoteSystemService {
|
|
|
public Map<String, SysDictResDto> queryDictMapByType(String type) {
|
|
|
List<SysDictResDto> sysDictResDtos = queryDictByType(type);
|
|
|
if (CollectionUtils.isEmpty(sysDictResDtos)) {
|
|
|
- return new HashMap<>(1);
|
|
|
+ return Collections.emptyMap();
|
|
|
}
|
|
|
|
|
|
return sysDictResDtos.stream().collect(Collectors.toMap(SysDictResDto::getValue, v->v));
|
|
|
@@ -300,7 +300,7 @@ public class RemoteSystemServiceImpl implements RemoteSystemService {
|
|
|
for (Long entId : entIdList) {
|
|
|
EntCacheResDto entCacheResDto = queryEntCacheById(entId);
|
|
|
if (Objects.isNull(entCacheResDto)) {
|
|
|
- return new HashMap<>(1);
|
|
|
+ return Collections.emptyMap();
|
|
|
}
|
|
|
remoteBaseService.fillRelate(entCacheResDto);
|
|
|
|
|
|
@@ -348,7 +348,7 @@ public class RemoteSystemServiceImpl implements RemoteSystemService {
|
|
|
public Map<Long, List<EntCacheResDto>> queryEntDeptCacheByIds(List<Long> entIds) {
|
|
|
List<KwsEntDept> kwsEntDepts = remoteBaseService.queryEntDeptCacheByIds(entIds);
|
|
|
if (CollectionUtils.isEmpty(kwsEntDepts)) {
|
|
|
- return new HashMap<>(4);
|
|
|
+ return Collections.emptyMap();
|
|
|
}
|
|
|
|
|
|
Map<Long, List<KwsEntDept>> collect = kwsEntDepts.stream().collect(Collectors.groupingBy(KwsEntDept::getEntPid));
|
|
|
@@ -366,7 +366,7 @@ public class RemoteSystemServiceImpl implements RemoteSystemService {
|
|
|
public Map<Long, EntCacheResDto> queryEntCacheMapByIds(List<Long> entIds) {
|
|
|
List<EntCacheResDto> entCacheResDtos = queryEntCacheByIds(entIds);
|
|
|
if (CollectionUtils.isEmpty(entCacheResDtos)) {
|
|
|
- return new HashMap<>();
|
|
|
+ return Collections.emptyMap();
|
|
|
}
|
|
|
return entCacheResDtos.stream().collect(Collectors.toMap(EntCacheResDto::getId, x -> x, (oldValue, newValue) -> newValue));
|
|
|
}
|
|
|
@@ -434,7 +434,7 @@ public class RemoteSystemServiceImpl implements RemoteSystemService {
|
|
|
public Map<Long, UserCacheResDto> queryUserCacheMapByIds(List<Long> userIds) {
|
|
|
List<UserCacheResDto> userCacheResDtos = queryUserCacheByIds(userIds);
|
|
|
if (CollectionUtils.isEmpty(userCacheResDtos)) {
|
|
|
- return new HashMap<>();
|
|
|
+ return Collections.emptyMap();
|
|
|
}
|
|
|
return userCacheResDtos.stream().collect(Collectors.toMap(UserCacheResDto::getId, x -> x, (oldValue, newValue) -> newValue));
|
|
|
}
|