[优化] 规则链优化

This commit is contained in:
PandaX
2024-02-25 13:56:14 +08:00
parent 6f7132a009
commit 4eca198425
9 changed files with 112 additions and 76 deletions

View File

@@ -111,7 +111,8 @@ func (p *ProductApi) InsertProduct(rc *restfulx.ReqCtx) {
data.OrgId = rc.LoginAccount.OrganizationId
// 如果未设置规则链,默认为主链
if data.RuleChainId == "" {
root := p.RuleApp.FindOneByRoot()
root, err := p.RuleApp.FindOneByRoot()
biz.ErrIsNil(err, "规则链查询错误")
data.RuleChainId = root.Id
}