数据管理

This commit is contained in:
tiger_zhou 2023-04-11 13:24:56 +08:00
parent cdd12fd1b8
commit 7382b9af0b

View File

@ -45,9 +45,7 @@ public class OperateParseServiceImpl implements VoiceTransactionalService {
}
// 参数解析
List<ParamExtractResult> paramExtractResults = result.getParamExtractResultList();
// paramExtractResults.stream().collect(Collectors.toMap())
Map<Integer,ParamExtractResult> paramExtractResultMap = IntStream.range(0,paramExtractResults.size()).boxed().collect(Collectors.toMap(i->++i,paramExtractResults::get));
OperateResult operateResult = new OperateResult(operateRule.getType());
int paramSize = paramExtractResults.size();
for (CommandParamRule paramRule : operateRule.getParamRules()) {
@ -58,7 +56,6 @@ public class OperateParseServiceImpl implements VoiceTransactionalService {
// 参数处理出错
return;
}
// paramArr[index] = paramExtractResults.get(paramRuleIndex);
paramArr[index] = paramExtractResultMap.get(paramRuleIndex);
}
if (StringUtils.hasText(paramRule.getName())) {