huangjiajun 1 ay önce
ebeveyn
işleme
f050e06f70
1 değiştirilmiş dosya ile 9 ekleme ve 1 silme
  1. +9
    -1
      consume/ad_original_data_application.go

+ 9
- 1
consume/ad_original_data_application.go Dosyayı Görüntüle

@@ -12,6 +12,7 @@ import (
"code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git/rabbit"
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/rule/one_circles"
db "code.fnuoos.com/zhimeng/model.git/src"
implement2 "code.fnuoos.com/zhimeng/model.git/src/implement"
"code.fnuoos.com/zhimeng/model.git/src/super/implement"
"code.fnuoos.com/zhimeng/model.git/src/super/model"
"encoding/json"
@@ -75,6 +76,7 @@ func handleAdOriginalDataApplication(msgData []byte) error {
if db.DBs[msg.Mid] == nil {
return nil
}
eg := db.DBs[msg.Mid]
wxApiService, err := wechat.NewWxApiService(msg.Mid, msg.ComponentAppid, msg.ComponentAppsecret)
if err != nil {
return err
@@ -91,14 +93,20 @@ func handleAdOriginalDataApplication(msgData []byte) error {
if err != nil {
return err
}
NewAppletApplicationAdSpaceListDb := implement2.NewAppletApplicationAdSpaceListDb(eg)

for _, v := range args.List {
count, _ := db.Db.Where("uuid=? and date=? and app_id=? and slot_id=?", msg.Mid, msg.Date, v.AppId, v.AdUnitId).Count(&model.OriginalWxAdData{})
if count > 0 {
continue
}
adData, _ := NewAppletApplicationAdSpaceListDb.GetAppletApplicationAdSpaceListByAdId(v.AdUnitId)
if adData == nil {
continue
}
tmp := model.OriginalWxAdData{
Uuid: utils.StrToInt(msg.Mid),
MediumId: 0,
MediumId: adData.MediumId,
AppId: v.AppId,
SlotId: v.AdUnitId,
AdSlot: v.StatItem.AdSlot,


Yükleniyor…
İptal
Kaydet