huangjiajun 3 tygodni temu
rodzic
commit
34daca77db
1 zmienionych plików z 4 dodań i 3 usunięć
  1. +4
    -3
      src/implement/applet_application_ad_space_list_implement.go

+ 4
- 3
src/implement/applet_application_ad_space_list_implement.go Wyświetl plik

@@ -4,6 +4,7 @@ import (
"code.fnuoos.com/zhimeng/model.git/src/dao"
"code.fnuoos.com/zhimeng/model.git/src/model"
zhios_order_relate_logx "code.fnuoos.com/zhimeng/model.git/utils/logx"
"strings"
"xorm.io/xorm"
)

@@ -40,13 +41,13 @@ func (a AppletApplicationAdSpaceListDb) FindAppletApplicationAdSpaceListByMedium
}
return medium, nil
}
func (a AppletApplicationAdSpaceListDb) FindAppletApplicationAdSpaceList(name, platform string, adType, state string, mediumId, page, limit int) (list []dao.AppletApplicationAdSpaceListGroup, total int64, err error) {
func (a AppletApplicationAdSpaceListDb) FindAppletApplicationAdSpaceList(name, platform string, adType, state string, mediumId string, page, limit int) (list []dao.AppletApplicationAdSpaceListGroup, total int64, err error) {
sess := a.Db.Where("applet_application_ad_space_list.id>0").Desc("applet_application_ad_space_list.id")
if page > 0 {
sess.Limit(limit, (page-1)*limit)
}
if mediumId > 0 {
sess.And("applet_application_ad_space_list.medium_id=?", mediumId)
if mediumId != "" {
sess.And("applet_application_ad_space_list.medium_id=?", strings.Split(mediumId, ","))
}
if name != "" {
sess.And("applet_application_ad_space_list.name like ? or applet_application_ad_space_list.ad_id like ?", "%"+name+"%", "%"+name+"%")


Ładowanie…
Anuluj
Zapisz