Browse Source

更新

master
huangjiajun 1 month ago
parent
commit
725e7331c9
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

@@ -9,6 +9,6 @@ type GenerateWxAdDataDao interface {
GenerateWxAdDataInsertBySession(session *xorm.Session, m *model.GenerateWxAdData) (int64, error) GenerateWxAdDataInsertBySession(session *xorm.Session, m *model.GenerateWxAdData) (int64, error)
GetGenerateWxAdData(id int) (data *model.GenerateWxAdData, err error) GetGenerateWxAdData(id int) (data *model.GenerateWxAdData, err error)
UpdateGenerateWxAdDataBySession(session *xorm.Session, m *model.GenerateWxAdData, columns ...string) (int64, error) UpdateGenerateWxAdDataBySession(session *xorm.Session, m *model.GenerateWxAdData, columns ...string) (int64, error)
FindGenerateWxAdDataList(uuid, appId, slotId, startDate, endDate string, page, limit int) (list []model.GenerateWxAdData, total int64, err error)
FindGenerateWxAdDataListMedium(uuid, appId, slotId, startDate, endDate string, page, limit int) (list []model.GenerateWxAdData, total int64, err 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)
} }

+ 8
- 2
src/super/implement/generate_wx_ad_data_implement.go View File

@@ -43,7 +43,7 @@ func (g GenerateWxAdDataDb) GenerateWxAdDataInsertBySession(session *xorm.Sessio
} }
return insertAffected, nil return insertAffected, nil
} }
func (g GenerateWxAdDataDb) FindGenerateWxAdDataList(uuid, appId, slotId, startDate, endDate string, page, limit int) (list []model.GenerateWxAdData, total int64, err error) {
func (g GenerateWxAdDataDb) FindGenerateWxAdDataList(uuid, appId, mediumId, slotId, startDate, endDate string, page, limit int) (list []model.GenerateWxAdData, total int64, err error) {
sess := g.Db.OrderBy("date desc,id desc").Limit(limit, (page-1)*limit) sess := g.Db.OrderBy("date desc,id desc").Limit(limit, (page-1)*limit)
if uuid != "" { if uuid != "" {
sess.And("uuid = ?", uuid) sess.And("uuid = ?", uuid)
@@ -57,6 +57,9 @@ func (g GenerateWxAdDataDb) FindGenerateWxAdDataList(uuid, appId, slotId, startD
if appId != "" { if appId != "" {
sess.In("app_id", strings.Split(appId, ",")) sess.In("app_id", strings.Split(appId, ","))
} }
if mediumId != "" {
sess.In("medium_id", strings.Split(mediumId, ","))
}
if slotId != "" { if slotId != "" {
sess.In("slot_id", strings.Split(slotId, ",")) sess.In("slot_id", strings.Split(slotId, ","))
} }
@@ -66,7 +69,7 @@ func (g GenerateWxAdDataDb) FindGenerateWxAdDataList(uuid, appId, slotId, startD
} }
return return
} }
func (g GenerateWxAdDataDb) FindGenerateWxAdDataListMedium(uuid, appId, slotId, startDate, endDate string, page, limit int) (list []model.GenerateWxAdData, total int64, err error) {
func (g GenerateWxAdDataDb) FindGenerateWxAdDataListMedium(uuid, appId, mediumId, slotId, 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) sess := g.Db.Where("is_generate_report=1").OrderBy("date desc,id desc").Limit(limit, (page-1)*limit)
if uuid != "" { if uuid != "" {
sess.And("uuid = ?", uuid) sess.And("uuid = ?", uuid)
@@ -80,6 +83,9 @@ func (g GenerateWxAdDataDb) FindGenerateWxAdDataListMedium(uuid, appId, slotId,
if appId != "" { if appId != "" {
sess.In("app_id", strings.Split(appId, ",")) sess.In("app_id", strings.Split(appId, ","))
} }
if mediumId != "" {
sess.In("medium_id", strings.Split(mediumId, ","))
}
if slotId != "" { if slotId != "" {
sess.In("slot_id", strings.Split(slotId, ",")) sess.In("slot_id", strings.Split(slotId, ","))
} }


Loading…
Cancel
Save