Browse Source

更新

master
huangjiajun 1 week ago
parent
commit
07021b79b1
2 changed files with 10 additions and 4 deletions
  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 View File

@@ -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 View File

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


Loading…
Cancel
Save