Browse Source

更新

master
huangjiajun 3 weeks ago
parent
commit
33ea9c4c90
3 changed files with 14 additions and 1 deletions
  1. +1
    -0
      src/dao/applet_application_dao.go
  2. +1
    -1
      src/implement/applet_application_ad_space_list_implement.go
  3. +12
    -0
      src/implement/applet_application_implement.go

+ 1
- 0
src/dao/applet_application_dao.go View File

@@ -8,4 +8,5 @@ type AppletApplicationDao interface {
GetAppletApplicationListByAppid(appId string) (medium *model.AppletApplication, err error)
FindAppletApplicationList(name, platform string, state []string, mediumId, page, limit int) (list []model.AppletApplication, total int64, err error)
FindAllAppletApplicationList() (list []model.AppletApplication, err error)
FindAllAppletApplicationListByMediumId(mediumId string) (list []model.AppletApplication, err error)
}

+ 1
- 1
src/implement/applet_application_ad_space_list_implement.go View File

@@ -47,7 +47,7 @@ func (a AppletApplicationAdSpaceListDb) FindAppletApplicationAdSpaceList(name, p
sess.Limit(limit, (page-1)*limit)
}
if mediumId != "" {
sess.And("applet_application_ad_space_list.medium_id=?", strings.Split(mediumId, ","))
sess.In("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+"%")


+ 12
- 0
src/implement/applet_application_implement.go View File

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

@@ -79,3 +80,14 @@ func (a AppletApplicationDb) FindAllAppletApplicationList() (list []model.Applet
}
return
}
func (a AppletApplicationDb) FindAllAppletApplicationListByMediumId(mediumId string) (list []model.AppletApplication, err error) {
sess := a.Db.Desc("id")
if mediumId != "" {
sess.In("medium_id", strings.Split(mediumId, ","))
}
err = sess.Find(&list)
if err != nil {
return nil, err
}
return
}

Loading…
Cancel
Save