From 1b5a96833e92582467be4135e1648f7d0389a6d8 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Mon, 30 Sep 2024 19:14:44 +0800 Subject: [PATCH 1/2] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/svc/svc_medium_agent.go b/app/svc/svc_medium_agent.go index 67adfe4..b38424b 100644 --- a/app/svc/svc_medium_agent.go +++ b/app/svc/svc_medium_agent.go @@ -196,7 +196,7 @@ func GetMediumByAccountId(c *gin.Context, name, account string) string { } } if account != "" { - sess.And(" username like ?", "%"+name+"%", "%"+name+"%") + sess.And(" username like ?", "%"+name+"%") } sess.Find(&tmp) for _, v := range tmp { From 16f12b126e1c4f54ed6fd77c033e3dc3509103e9 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Mon, 30 Sep 2024 19:19:16 +0800 Subject: [PATCH 2/2] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/svc/svc_medium_agent.go b/app/svc/svc_medium_agent.go index b38424b..75b3b85 100644 --- a/app/svc/svc_medium_agent.go +++ b/app/svc/svc_medium_agent.go @@ -196,7 +196,7 @@ func GetMediumByAccountId(c *gin.Context, name, account string) string { } } if account != "" { - sess.And(" username like ?", "%"+name+"%") + sess.And(" username like ?", "%"+account+"%") } sess.Find(&tmp) for _, v := range tmp {