yumeng 3 semanas atrás
pai
commit
61064fd9b7

+ 1 - 0
src/main/java/com/adx/tencent/storage/TiDBColdStore.java

@@ -154,6 +154,7 @@ public class TiDBColdStore {
             mapper.insertOrUpdate(
                 record.getQk(), record.getMedia(), record.getMediaTraceId(),
                 record.getPlatform(), record.getAdId(), record.getAccountId(),
+                record.getEventType(),
                 record.getReqId(), record.getBidId(), record.getCreativeId(),
                 record.getImpId(), record.getTagId(), record.getPrice() != null ? record.getPrice() : 0L,
                 showUrls, clickUrls, record.getLandingPage(),

+ 1 - 0
src/main/java/com/adx/tencent/storage/mapper/BidEventMapper.java

@@ -11,6 +11,7 @@ public interface BidEventMapper {
                         @Param("platform") String platform,
                         @Param("adId") String adId,
                         @Param("accountId") String accountId,
+                        @Param("eventType") String eventType,
                         @Param("reqId") String reqId,
                         @Param("bidId") String bidId,
                         @Param("creativeId") String creativeId,

+ 3 - 0
src/main/java/com/adx/tencent/storage/model/BidRecord.java

@@ -15,6 +15,7 @@ public class BidRecord {
     @JsonProperty("platform")     private String platform;
     @JsonProperty("adId")         private String adId;
     @JsonProperty("accountId")    private String accountId;
+    @JsonProperty("eventType")    private String eventType;
     @JsonProperty("reqId")        private String reqId;
     @JsonProperty("bidId")        private String bidId;
     @JsonProperty("creativeId")   private String creativeId;
@@ -41,6 +42,8 @@ public class BidRecord {
     public void setAdId(String v) { this.adId = v; }
     public String getAccountId() { return accountId; }
     public void setAccountId(String v) { this.accountId = v; }
+    public String getEventType() { return eventType; }
+    public void setEventType(String v) { this.eventType = v; }
     public String getReqId() { return reqId; }
     public void setReqId(String v) { this.reqId = v; }
     public String getBidId() { return bidId; }

+ 3 - 2
src/main/resources/mapper/BidEventMapper.xml

@@ -4,12 +4,12 @@
 <mapper namespace="com.adx.tencent.storage.mapper.BidEventMapper">
     <insert id="insertOrUpdate">
         INSERT INTO tencent_ad_bid_events (
-            qk, media, media_trace_id, platform, ad_id, account_id,
+            qk, media, media_trace_id, platform, ad_id, account_id, event_type,
             req_id, bid_id, creative_id, imp_id, tag_id, price,
             show_urls, click_urls, landing_page, app_store_link, package_name,
             media_params, created_at
         ) VALUES (
-            #{qk}, #{media}, #{mediaTraceId}, #{platform}, #{adId}, #{accountId},
+            #{qk}, #{media}, #{mediaTraceId}, #{platform}, #{adId}, #{accountId}, #{eventType},
             #{reqId}, #{bidId}, #{creativeId},
             #{impId}, #{tagId}, #{price}, #{showUrls}, #{clickUrls}, #{landingPage},
             #{appStoreLink}, #{packageName}, #{mediaParams}, #{createdAt}
@@ -20,6 +20,7 @@
             platform = VALUES(platform),
             ad_id = VALUES(ad_id),
             account_id = VALUES(account_id),
+            event_type = VALUES(event_type),
             req_id = VALUES(req_id),
             bid_id = VALUES(bid_id),
             creative_id = VALUES(creative_id),