huangjiajun пре 1 недеља
родитељ
комит
56b007c1b5
2 измењених фајлова са 27 додато и 0 уклоњено
  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 Прегледај датотеку

@@ -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 Прегледај датотеку

@@ -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
}

Loading…
Откажи
Сачувај