fix: 修复无法通知角色和部门的bug.

This commit is contained in:
Mr. Lan 2020-11-19 21:07:29 +08:00
parent 0219221d92
commit 5165de4868

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 {