From 5165de48689c00da1129b76f19f19af355d31d51 Mon Sep 17 00:00:00 2001 From: "Mr. Lan" Date: Thu, 19 Nov 2020 21:07:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E8=A7=92=E8=89=B2=E5=92=8C=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E7=9A=84bug.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/service/getPrincipal.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkg/service/getPrincipal.go b/pkg/service/getPrincipal.go index 0c73416..f4c58e6 100644 --- a/pkg/service/getPrincipal.go +++ b/pkg/service/getPrincipal.go @@ -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 {