修复了api唯一key关联的bug,修复了角色删除失败的bug

This commit is contained in:
pixel
2020-04-13 17:45:33 +08:00
parent 959aa9cd38
commit f68947d50e
5 changed files with 22 additions and 16 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ func CreateAuthority(auth model.SysAuthority) (err error, authority model.SysAut
// @param auth model.SysAuthority
// @return error
// 删除角色
func DeleteAuthority(auth model.SysAuthority) (err error) {
func DeleteAuthority(auth *model.SysAuthority) (err error) {
err = global.GVA_DB.Where("authority_id = ?", auth.AuthorityId).Find(&model.SysUser{}).Error
if err == nil {
err = errors.New("此角色有用户正在使用禁止删除")