diff --git a/src/main/java/com/supervision/police/service/impl/ModelIndexServiceImpl.java b/src/main/java/com/supervision/police/service/impl/ModelIndexServiceImpl.java index 20f9084..f19fb16 100644 --- a/src/main/java/com/supervision/police/service/impl/ModelIndexServiceImpl.java +++ b/src/main/java/com/supervision/police/service/impl/ModelIndexServiceImpl.java @@ -112,18 +112,17 @@ public class ModelIndexServiceImpl extends ServiceImpl ids = new ArrayList<>(); + Set ids = new HashSet<>(); IndexRule indexRule = index.getIndexRule(); if (indexRule != null) { - Set idSet = new HashSet<>(); List ruleConditionGroupList = indexRule.getRuleConditionGroupList(); for (RuleConditionGroup ruleConditionGroup : ruleConditionGroupList) { List ruleConditionList = ruleConditionGroup.getRuleConditionList(); for (RuleCondition ruleCondition : ruleConditionList) { - idSet.add(ruleCondition.getAtomicIndexId()); + ids.add(ruleCondition.getAtomicIndexId()); } } - List atomicIndexList = modelAtomicIndexService.selectBatchIds(idSet.stream().toList()); + List atomicIndexList = modelAtomicIndexService.selectBatchIds(ids.stream().toList()); index.setAtomicIndexList(atomicIndexList); } else if (StringUtils.isNotEmpty(judgeLogic)) { List logic = JSONUtil.toList(judgeLogic, JudgeLogic.class); @@ -133,7 +132,7 @@ public class ModelIndexServiceImpl extends ServiceImpl atomicIndexList = modelAtomicIndexService.selectBatchIds(ids); + List atomicIndexList = modelAtomicIndexService.selectBatchIds(ids.stream().toList()); index.setAtomicIndexList(atomicIndexList); } index.setAtomicIndexNum(ids.size());