ソースを参照

更新

master
huangjiajun 3週間前
コミット
34daca77db
1個のファイルの変更4行の追加3行の削除
  1. +4
    -3
      src/implement/applet_application_ad_space_list_implement.go

+ 4
- 3
src/implement/applet_application_ad_space_list_implement.go ファイルの表示

@@ -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+"%")


読み込み中…
キャンセル
保存