From a99ad05c8097706ab7b417c41e7ffa9f40fdd79a Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Mon, 4 Nov 2024 14:05:17 +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 | 17 +++++++++++++++++ go.mod | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/app/svc/svc_medium_agent.go b/app/svc/svc_medium_agent.go index 0d151b7..fa732c0 100644 --- a/app/svc/svc_medium_agent.go +++ b/app/svc/svc_medium_agent.go @@ -312,6 +312,23 @@ func GetMediumIdStr(c *gin.Context, admId int, name, account string) string { } NewAdminDb := implement2.NewAdminDb(MasterDb(c)) super, _ := NewAdminDb.GetSuperAdmin() + if len(list) == 0 { + user := GetUser(c) + NewAppletApplicationDb := implement2.NewMediumDb(MasterDb(c)) + appList := NewAppletApplicationDb.FindAllSuperAdmin() + if appList != nil { + for _, v := range *appList { + if user.IsSuperAdministrator != 1 && user.ShowTime != "" { + showTime := utils.TimeStdParseUnix(user.ShowTime + " 00:00:00") + if utils.TimeStdParseUnix(v.CreateAt) >= showTime { + appIds = append(appIds, utils.IntToStr(v.MediumId)) + ids = append(ids, utils.IntToStr(v.MediumId)) + } + } + } + } + + } if admId == 0 || admId == super.AdmId { //为空就查全部 appIds = []string{} } diff --git a/go.mod b/go.mod index fbc21b5..5c78a44 100644 --- a/go.mod +++ b/go.mod @@ -35,7 +35,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.20241104033828-ce3223d3e794 + code.fnuoos.com/zhimeng/model.git v0.0.3-0.20241104060107-b89d15ebb7fd github.com/360EntSecGroup-Skylar/excelize v1.4.1 github.com/gin-contrib/cors v1.7.2 github.com/jinzhu/copier v0.4.0