From 45872d27c55fa9a5e337b5b9891f73a25c8f994d Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 25 Oct 2024 09:21:40 +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 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/svc/svc_medium_agent.go b/app/svc/svc_medium_agent.go index 2fc19be..4d1824e 100644 --- a/app/svc/svc_medium_agent.go +++ b/app/svc/svc_medium_agent.go @@ -190,7 +190,7 @@ func GetMediumByAccountId(c *gin.Context, name, account string) string { if name != "" { sess.And("memo like ?", "%"+name+"%") var tmp1 []model.MediumList - MasterDb(c).Where("company_name like ? or company_abbreviation like ?", "%"+name+"%", "%"+name+"%").Find(&tmp1) + db.Db.Where("company_name like ? or company_abbreviation like ?", "%"+name+"%", "%"+name+"%").Find(&tmp1) for _, v := range tmp1 { ids = append(ids, utils.IntToStr(v.MediumId)) } @@ -319,7 +319,7 @@ func GetMediumIdStr(c *gin.Context, admId int, name, account string) string { appIds = []string{"-1"} ex := strings.Split(appId, ",") for _, v := range ex { - if utils.InArr(v, ids) || len(list) == 0 { + if utils.InArr(v, ids) || len(list) == 0 || admId == super.AdmId { appIds = append(appIds, v) } }