Ver código fonte

更新规则链创建

liuxiulin 2 anos atrás
pai
commit
f6b776770b
1 arquivos alterados com 4 adições e 2 exclusões
  1. 4 2
      services/knowoapi/services/rule_chain.go

+ 4 - 2
services/knowoapi/services/rule_chain.go

@@ -70,13 +70,15 @@ func (a ruleChainService) create(params *models.RuleChainParams) (firstNodeId st
 	nodeMap := make(map[string]models.RuleNode)
 	var inputNodeId string
 
-	for _, v := range params.Cell {
+	for i, v := range params.Cell {
 		if v.GetString("shape") != "edge" {
 			if v.GetString("shape") == "input_node" {
-				fmt.Println(v.GetString("shape"))
 				inputNodeId = v.GetString("source.cell")
 				continue
 			}
+
+			fmt.Println(i, v.GetString("shape"))
+
 			ruleNode := models.RuleNode{
 				RecordId:      guid.S(),
 				RuleChainID:   params.RecordId,