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