dengbiao 7 months ago
parent
commit
96d28f32de
1 changed files with 6 additions and 5 deletions
  1. +6
    -5
      app/admin/svc/svc_scheme.go

+ 6
- 5
app/admin/svc/svc_scheme.go View File

@@ -47,12 +47,13 @@ func SchemeBindEnterprise(req md.SchemeBindEnterpriseReq) (err error) {
EnterpriseId: v,
})
}
_, err = schemeEnterpriseDb.BatchAddSchemeEnterpriseBySession(session, mm)
if err != nil {
_ = session.Rollback()
return
if len(mm) > 0 {
_, err = schemeEnterpriseDb.BatchAddSchemeEnterpriseBySession(session, mm)
if err != nil {
_ = session.Rollback()
return
}
}

return session.Commit()
}



Loading…
Cancel
Save