Explorar el Código

更新

master
huangjiajun hace 1 mes
padre
commit
370920be3d
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. +5
    -2
      src/super/implement/medium_list_implement.go

+ 5
- 2
src/super/implement/medium_list_implement.go Ver fichero

@@ -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)


Cargando…
Cancelar
Guardar