huangjiajun pirms 1 mēnesi
vecāks
revīzija
56b007c1b5
2 mainītis faili ar 27 papildinājumiem un 0 dzēšanām
  1. +1
    -0
      src/super/dao/generate_wx_ad_data_dao.go
  2. +26
    -0
      src/super/implement/generate_wx_ad_data_implement.go

+ 1
- 0
src/super/dao/generate_wx_ad_data_dao.go Parādīt failu

@@ -11,4 +11,5 @@ type GenerateWxAdDataDao interface {
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)
}

+ 26
- 0
src/super/implement/generate_wx_ad_data_implement.go Parādīt failu

@@ -95,3 +95,29 @@ 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) {
sess := g.Db.Where("is_generate_report=1").OrderBy("date desc,id desc").Limit(limit, (page-1)*limit)
if uuid != "" {
sess.And("uuid = ?", uuid)
}
if startDate != "" {
sess.And("date>=", startDate)
}
if endDate != "" {
sess.And("date<=", endDate)
}
if appId != "" {
sess.In("app_id", strings.Split(appId, ","))
}
if mediumId != "" {
sess.In("medium_id", strings.Split(mediumId, ","))
}
if slotId != "" {
sess.In("slot_id", strings.Split(slotId, ","))
}
err = sess.Find(&list)
if err != nil {
return nil, err
}
return
}

Notiek ielāde…
Atcelt
Saglabāt