Sfoglia il codice sorgente

修复多个执行动作未生效

zhou-hao 4 anni fa
parent
commit
962f1e8dff

+ 2 - 0
jetlinks-manager/rule-engine-manager/src/main/java/org/jetlinks/community/rule/engine/model/SqlRuleModelParser.java

@@ -50,6 +50,7 @@ public class SqlRuleModelParser implements RuleModelParserStrategy {
                 if (!StringUtils.hasText(act.getExecutor())) {
                     continue;
                 }
+                index++;
                 RuleNodeModel action = new RuleNodeModel();
                 action.setId("error:action:" + index);
                 action.setName("错误处理:" + index);
@@ -93,6 +94,7 @@ public class SqlRuleModelParser implements RuleModelParserStrategy {
                 if (!StringUtils.hasText(operation.getExecutor())) {
                     continue;
                 }
+                index++;
                 RuleNodeModel action = new RuleNodeModel();
                 action.setId("action:" + index);
                 action.setName("执行动作:" + index);