Browse Source

更新

master
huangjiajun 1 month ago
parent
commit
370920be3d
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      src/super/implement/medium_list_implement.go

+ 5
- 2
src/super/implement/medium_list_implement.go View File

@@ -52,10 +52,13 @@ func (m MediumListDb) UpdateMediumList(medium *model.MediumList, columns ...stri
} }
return affected, nil 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) sess := m.Db.Desc("id").Limit(limit, (page-1)*limit)
if mediumId != "" {
sess.In("medium_id", strings.Split(mediumId, ","))
}
if name != "" { if name != "" {
sess.In("medium_id", name)
sess.And("company_name like ?", "%"+name+"%")
} }
if state != "" { if state != "" {
sess.And("state = ?", state) sess.And("state = ?", state)


Loading…
Cancel
Save