From a16d531be3792795a19a654fed4be4f0144cd5ef Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 24 Oct 2024 20:49:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/svc/svc_medium_agent.go | 4 +++- go.mod | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/svc/svc_medium_agent.go b/app/svc/svc_medium_agent.go index 61c758e..2fc19be 100644 --- a/app/svc/svc_medium_agent.go +++ b/app/svc/svc_medium_agent.go @@ -310,7 +310,9 @@ func GetMediumIdStr(c *gin.Context, admId int, name, account string) string { appIds = append(appIds, utils.IntToStr(v.MediumId)) ids = append(ids, utils.IntToStr(v.MediumId)) } - if len(list) == 0 { //为空就查全部 + NewAdminDb := implement2.NewAdminDb(MasterDb(c)) + super, _ := NewAdminDb.GetSuperAdmin() + if admId == 0 || admId == super.AdmId { //为空就查全部 appIds = []string{} } if appId != "" { //不为空就判断 有没有在列表里面 diff --git a/go.mod b/go.mod index df18579..66b6a0b 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( require ( code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git v1.1.21-0.20240830072333-a1980ffb256e - code.fnuoos.com/zhimeng/model.git v0.0.3-0.20241024113302-5f350a1a0c09 + code.fnuoos.com/zhimeng/model.git v0.0.3-0.20241024124640-d373e083503a github.com/jinzhu/copier v0.4.0 )