fix🐛: 修复前端设置数据权限不生效问题
fix🐛: 修复前端设置数据权限不生效问题
This commit is contained in:
3 files changed
+9
-6
No files matched your search
@@ -227,7 +227,7 @@ func (e *SysRole) UpdateDataScope(c *dto.RoleDataScopeReq) *SysRole {
|
||||
var dlist = make([]models.SysDept, 0)
|
||||
var model = models.SysRole{}
|
||||
tx.Preload("SysDept").First(&model, c.RoleId)
|
||||
tx.Where("id in ?", c.DeptIds).Find(&dlist)
|
||||
tx.Where("dept_id in ?", c.DeptIds).Find(&dlist)
|
||||
err = tx.Model(&model).Association("SysDept").Delete(model.SysDept)
|
||||
if err != nil {
|
||||
e.Log.Errorf("delete SysDept error:%s", err)
|
||||
|
||||
Reference in new issue
Block a user