|
|
|
@@ -111,9 +111,9 @@ public class DictServiceImpl implements DictService { |
|
|
|
public DictDTO findByName(String name, String filter) { |
|
|
|
Dict dict = dictMapper.selectCollByName(name); |
|
|
|
if (!StringUtils.isEmpty(filter) && !ObjectUtils.isEmpty(dict) && !CollectionUtils.isEmpty(dict.getDictDetails())) { |
|
|
|
// algorithmUsage:异常检测 |
|
|
|
// algorithmUsage:异常检测 目前只有algorithmUsage一种类型,所以不需要判断取哪个配置,方便以后扩展 |
|
|
|
String[] split = filter.split(":"); |
|
|
|
String s = split[1]; |
|
|
|
String s = split.length > 1 ? split[1] : ""; |
|
|
|
List<String> algorithmLimit = configAlgorithmLimit(s); |
|
|
|
List<DictDetail> collect = dict.getDictDetails().stream().filter(item -> CollectionUtils.isEmpty(algorithmLimit) || algorithmLimit.contains(item.getValue())).collect(Collectors.toList()); |
|
|
|
dict.setDictDetails(collect); |
|
|
|
|