From 370920be3d5c2388de4419337354a0e7b4c757f4 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 25 Oct 2024 09:38:50 +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 --- src/super/implement/medium_list_implement.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/super/implement/medium_list_implement.go b/src/super/implement/medium_list_implement.go index ab77bad..f975dd3 100644 --- a/src/super/implement/medium_list_implement.go +++ b/src/super/implement/medium_list_implement.go @@ -52,10 +52,13 @@ func (m MediumListDb) UpdateMediumList(medium *model.MediumList, columns ...stri } return affected, nil } -func (m MediumListDb) FindMediumList(uuid, name, state string, minState, page, limit int) (list []model.MediumList, total int64, err error) { +func (m MediumListDb) FindMediumList(uuid, name, mediumId, state string, minState, page, limit int) (list []model.MediumList, total int64, err error) { sess := m.Db.Desc("id").Limit(limit, (page-1)*limit) + if mediumId != "" { + sess.In("medium_id", strings.Split(mediumId, ",")) + } if name != "" { - sess.In("medium_id", name) + sess.And("company_name like ?", "%"+name+"%") } if state != "" { sess.And("state = ?", state)