huangjiajun 1 mese fa
parent
commit
f050e06f70
1 ha cambiato i file con 9 aggiunte e 1 eliminazioni
  1. +9
    -1
      consume/ad_original_data_application.go

+ 9
- 1
consume/ad_original_data_application.go Vedi File

@@ -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,


Caricamento…
Annulla
Salva