소스 검색

更新

master
huangjiajun 1 주 전
부모
커밋
07021b79b1
2개의 변경된 파일10개의 추가작업 그리고 4개의 파일을 삭제
  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 파일 보기

@@ -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 파일 보기

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


불러오는 중...
취소
저장