Ver código fonte

更新

master
huangjiajun 1 semana atrás
pai
commit
56b007c1b5
2 arquivos alterados com 27 adições e 0 exclusões
  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 Ver arquivo

@@ -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 Ver arquivo

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

Carregando…
Cancelar
Salvar