🐛 SSH 配置未启用还可以连接.
This commit is contained in:
@@ -101,6 +101,16 @@ public interface DataExtraApi {
|
||||
*/
|
||||
Future<Map<Long, String>> getExtraItemValuesByCacheAsync(Long userId, DataExtraTypeEnum type, String item);
|
||||
|
||||
/**
|
||||
* 异步查询额外配置项 (查询缓存)
|
||||
*
|
||||
* @param userId userId
|
||||
* @param type type
|
||||
* @param items items
|
||||
* @return value
|
||||
*/
|
||||
Future<List<Map<Long, String>>> getExtraItemsValuesByCacheAsync(Long userId, DataExtraTypeEnum type, List<String> items);
|
||||
|
||||
/**
|
||||
* 查询额外配置
|
||||
*
|
||||
|
||||
@@ -102,6 +102,13 @@ public class DataExtraApiImpl implements DataExtraApi {
|
||||
return CompletableFuture.completedFuture(this.getExtraItemValuesByCache(userId, type, item));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Future<List<Map<Long, String>>> getExtraItemsValuesByCacheAsync(Long userId, DataExtraTypeEnum type, List<String> items) {
|
||||
Valid.allNotNull(userId, type);
|
||||
Valid.notEmpty(items);
|
||||
return CompletableFuture.completedFuture(dataExtraService.getExtraItemsValuesByCache(userId, type.name(), items));
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataExtraDTO getExtraItem(DataExtraQueryDTO dto, DataExtraTypeEnum type) {
|
||||
Valid.allNotNull(dto.getUserId(), dto.getRelId(), dto.getItem());
|
||||
|
||||
@@ -85,6 +85,16 @@ public interface DataExtraService {
|
||||
*/
|
||||
Map<Long, String> getExtraItemValuesByCache(Long userId, String type, String item);
|
||||
|
||||
/**
|
||||
* 查询额外配置项 (查询缓存)
|
||||
*
|
||||
* @param userId userId
|
||||
* @param type type
|
||||
* @param items items
|
||||
* @return [relId:value, relId:value]
|
||||
*/
|
||||
List<Map<Long, String>> getExtraItemsValuesByCache(Long userId, String type, List<String> items);
|
||||
|
||||
/**
|
||||
* 查询额外配置
|
||||
*
|
||||
|
||||
@@ -170,6 +170,13 @@ public class DataExtraServiceImpl implements DataExtraService {
|
||||
return Maps.map(entities, Long::valueOf, Function.identity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<Long, String>> getExtraItemsValuesByCache(Long userId, String type, List<String> items) {
|
||||
return items.stream()
|
||||
.map(s -> this.getExtraItemValuesByCache(userId, type, s))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataExtraDO getExtraItem(DataExtraQueryRequest request) {
|
||||
return dataExtraDAO.of()
|
||||
|
||||
Reference in New Issue
Block a user