feat:完善项目

This commit is contained in:
henry
2021-11-12 14:08:42 +08:00
parent a8259f53a2
commit a22029f4a3
9 changed files with 102 additions and 34 deletions

View File

@ -105,8 +105,10 @@ func (c *Role) Bind(id uint64, roleIDs []uint64) error {
})
mark[v] = v
}
if err = model2.Creates(mSysUserRole.SysUserRole, roles, tx); err != nil {
return err
if len(roles) > 0 {
if err = model2.Creates(mSysUserRole.SysUserRole, roles, tx); err != nil {
return err
}
}
return nil
})