From 5309808a08c3b9ea5bce05e3357645bb7c47608f Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 27 Sep 2024 11:43:35 +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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/svc/svc_medium_agent.go b/app/svc/svc_medium_agent.go index b02d586..9c12c95 100644 --- a/app/svc/svc_medium_agent.go +++ b/app/svc/svc_medium_agent.go @@ -24,9 +24,11 @@ func AgentBindMediumList(c *gin.Context) { //代理 查旗下 媒体 e.OutErr(c, err1.Code, err1.Error()) return } + var tmp model2.Agent + MasterDb(c).Where("id=?", req.Id).Get(&tmp) engine := db.Db agentWithMediumDb := implement.NewAgentWithMediumDb(engine) - data, total, _ := agentWithMediumDb.FindAgentWithMediumList(req.Name, req.State, utils.StrToInt(req.Id), 0, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) + data, total, _ := agentWithMediumDb.FindAgentWithMediumList(req.Name, req.State, tmp.AgentId, 0, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) list := make([]md.MediumListData, 0) NewMediumDb := implement2.NewMediumDb(MasterDb(c)) @@ -72,9 +74,11 @@ func MediumBindAgentList(c *gin.Context) { e.OutErr(c, err1.Code, err1.Error()) return } + var tmp model2.Medium + MasterDb(c).Where("id=?", req.Id).Get(&tmp) engine := db.Db agentWithMediumDb := implement.NewAgentWithMediumDb(engine) - data, total, _ := agentWithMediumDb.FindAgentWithMediumList(req.Name, req.State, 0, utils.StrToInt(req.Id), utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) + data, total, _ := agentWithMediumDb.FindAgentWithMediumList(req.Name, req.State, 0, tmp.MediumId, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) list := make([]md.MediumListData, 0) NewAgentDb := implement2.NewAgentDb(MasterDb(c))