liuxiulin 2 年之前
父节点
当前提交
7eb48ed200
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      services/knowoapi/model/rule_chain.go
  2. 1 1
      services/knowoapi/services/rule_chain.go

+ 1 - 1
services/knowoapi/model/rule_chain.go

@@ -67,7 +67,7 @@ func (a *RuleChain) Update(ruleChain *models.RuleChain) error {
 }
 
 // UpdateChainRoot 设置规则链
-func (a *RuleChain) UpdateChainRoot(vendorId string, id string, isRoot int) (data models.RuleChain, err error) {
+func (a *RuleChain) UpdateChainRoot(vendorId, id string, isRoot int) (data models.RuleChain, err error) {
 	err = a.db.Model(&data).Where("vendor_id = ? and record_id = ?", vendorId, id).
 		Update(map[string]interface{}{
 			"root": isRoot,

+ 1 - 1
services/knowoapi/services/rule_chain.go

@@ -237,7 +237,7 @@ func (a ruleChainService) UpdateChainRoot(params *models.ChangeRootParams) error
 	if params.Root {
 		isRoot = 1
 	}
-	fmt.Println(params.RecordId, params.Root, params.VendorId)
+	fmt.Println(params.RecordId, params.Root, isRoot)
 	_, err := a.model.RuleChain.UpdateChainRoot(params.VendorId, params.RecordId, isRoot)
 	if err != nil {
 		return err