fix:#746
This commit is contained in:
奇淼(piexlmax
2021-09-26 18:11:25 +08:00
committed by GitHub
parent 7466ef21e5
commit 5b7c1fb8fe
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -114,6 +114,10 @@ func (userService *UserService) SetUserAuthorities(id uint, authorityIds []strin
if TxErr != nil {
return TxErr
}
TxErr = tx.Where("id = ?", id).First(&system.SysUser{}).Update("authority_id", authorityIds[0]).Error
if TxErr != nil {
return TxErr
}
// 返回 nil 提交事务
return nil
})