fix🐛: 修复获取部门数据查询参数问题
This commit is contained in:
1 parent
b97b3bc6d8
commit
993115c8ae
1 file changed
+1
-1
@@ -204,7 +204,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.DeptIds)
|
||||
tx.Preload("SysDept").First(&model, c.RoleId)
|
||||
tx.Where("id in ?", c.DeptIds).Find(&dlist)
|
||||
err = tx.Model(&model).Association("SysDept").Delete(model.SysDept)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user