Parcourir la source

更新

master
huangjiajun il y a 1 semaine
Parent
révision
07021b79b1
2 fichiers modifiés avec 10 ajouts et 4 suppressions
  1. +2
    -2
      src/super/dao/generate_wx_ad_data_dao.go
  2. +8
    -2
      src/super/implement/generate_wx_ad_data_implement.go

+ 2
- 2
src/super/dao/generate_wx_ad_data_dao.go Voir le fichier

@@ -10,6 +10,6 @@ type GenerateWxAdDataDao interface {
GetGenerateWxAdData(id int) (data *model.GenerateWxAdData, err error)
UpdateGenerateWxAdDataBySession(session *xorm.Session, m *model.GenerateWxAdData, columns ...string) (int64, error)
FindGenerateWxAdDataList(uuid, appId, mediumId, slotId, startDate, endDate string, page, limit int) (list []model.GenerateWxAdData, total int64, err error)
FindGenerateWxAdDataListMedium(uuid, appId, mediumId, slotId, startDate, endDate string, page, limit int) (list []model.GenerateWxAdData, total int64, err error)
FindGenerateWxAdDataListMediumAll(uuid, appId, mediumId, slotId, startDate, endDate string, page, limit int) (list []model.GenerateWxAdData, err error)
FindGenerateWxAdDataListMedium(uuid, appId, mediumId, slotId, adType, startDate, endDate string, page, limit int) (list []model.GenerateWxAdData, total int64, err error)
FindGenerateWxAdDataListMediumAll(uuid, appId, mediumId, slotId, adType, startDate, endDate string, page, limit int) (list []model.GenerateWxAdData, err error)
}

+ 8
- 2
src/super/implement/generate_wx_ad_data_implement.go Voir le fichier

@@ -69,7 +69,7 @@ func (g GenerateWxAdDataDb) FindGenerateWxAdDataList(uuid, appId, mediumId, slot
}
return
}
func (g GenerateWxAdDataDb) FindGenerateWxAdDataListMedium(uuid, appId, mediumId, slotId, startDate, endDate string, page, limit int) (list []model.GenerateWxAdData, total int64, err error) {
func (g GenerateWxAdDataDb) FindGenerateWxAdDataListMedium(uuid, appId, mediumId, slotId, adType, startDate, endDate string, page, limit int) (list []model.GenerateWxAdData, total int64, err error) {
sess := g.Db.Where("is_generate_report=1").OrderBy("date desc,id desc").Limit(limit, (page-1)*limit)
if uuid != "" {
sess.And("uuid = ?", uuid)
@@ -83,6 +83,9 @@ func (g GenerateWxAdDataDb) FindGenerateWxAdDataListMedium(uuid, appId, mediumId
if appId != "" {
sess.In("app_id", strings.Split(appId, ","))
}
if adType != "" {
sess.And("ad_slot = ?", adType)
}
if mediumId != "" {
sess.In("medium_id", strings.Split(mediumId, ","))
}
@@ -95,7 +98,7 @@ func (g GenerateWxAdDataDb) FindGenerateWxAdDataListMedium(uuid, appId, mediumId
}
return
}
func (g GenerateWxAdDataDb) FindGenerateWxAdDataListMediumAll(uuid, appId, mediumId, slotId, startDate, endDate string, page, limit int) (list []model.GenerateWxAdData, err error) {
func (g GenerateWxAdDataDb) FindGenerateWxAdDataListMediumAll(uuid, appId, mediumId, slotId, adType, startDate, endDate string, page, limit int) (list []model.GenerateWxAdData, err error) {
sess := g.Db.Where("is_generate_report=1").OrderBy("date asc,id asc").Limit(limit, (page-1)*limit)
if uuid != "" {
sess.And("uuid = ?", uuid)
@@ -109,6 +112,9 @@ func (g GenerateWxAdDataDb) FindGenerateWxAdDataListMediumAll(uuid, appId, mediu
if appId != "" {
sess.In("app_id", strings.Split(appId, ","))
}
if adType != "" {
sess.And("ad_slot = ?", adType)
}
if mediumId != "" {
sess.In("medium_id", strings.Split(mediumId, ","))
}


Chargement…
Annuler
Enregistrer