Skip to content

Commit

Permalink
fix: 修复无法通知角色和部门的bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
lanyulei committed Nov 19, 2020
1 parent 0219221 commit 5165de4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pkg/service/getPrincipal.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,22 @@ func GetPrincipalUserInfo(stateList []interface{}, creator int) (userInfoList []
return
}
userInfoList = append(userInfoList, userInfoListTmp...)
case "role":
err = orm.Eloquent.Model(&system.SysUser{}).
Where("role_id in (?)", processorList).
Find(&userInfoListTmp).Error
if err != nil {
return
}
userInfoList = append(userInfoList, userInfoListTmp...)
case "department":
err = orm.Eloquent.Model(&system.SysUser{}).
Where("dept_id in (?)", processorList).
Find(&userInfoListTmp).Error
if err != nil {
return
}
userInfoList = append(userInfoList, userInfoListTmp...)
case "variable": // 变量
for _, processor := range processorList {
if int(processor.(float64)) == 1 {
Expand Down

0 comments on commit 5165de4

Please sign in to comment.