Skip to content

Commit

Permalink
Merge pull request #111 from lanyulei/dev
Browse files Browse the repository at this point in the history
fix: 修复无法通知角色和部门的bug.
  • Loading branch information
lanyulei authored Nov 19, 2020
2 parents 922dfa7 + 5165de4 commit 999c8c3
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 999c8c3

Please sign in to comment.