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)