|
@@ -74,6 +74,8 @@ func (a ruleChainService) create(ruleChain *models.RuleChain) error {
|
|
|
if len(ruleChain.Cell) == 0 {
|
|
|
return nil
|
|
|
}
|
|
|
+ fmt.Println("=================================")
|
|
|
+ fmt.Println(ruleChain.Cell)
|
|
|
marshal, _ := json.Marshal(ruleChain.Cell)
|
|
|
ruleChain.Configuration = fmt.Sprintf("%s", marshal)
|
|
|
fmt.Println("++++++++++++++++++++++++++++++++")
|
|
@@ -235,5 +237,9 @@ func (a ruleChainService) UpdateChainRoot(ruleChain *models.RuleChain) error {
|
|
|
if ruleChain.Root {
|
|
|
isRoot = 1
|
|
|
}
|
|
|
- return a.model.RuleChain.UpdateChainRoot(ruleChain.VendorID, ruleChain.RecordId, isRoot)
|
|
|
+ _, err := a.model.RuleChain.UpdateChainRoot(ruleChain.VendorID, ruleChain.RecordId, isRoot)
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ return nil
|
|
|
}
|