Merge pull request #111 from lanyulei/dev

fix: 修复无法通知角色和部门的bug.
This commit is contained in:
lanyulei 2020-11-19 21:08:02 +08:00 committed by GitHub
commit 999c8c3075
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {