ソースを参照

1.添加流量池字段flowPool上报

wenweiwei 3 年 前
コミット
c4d518eed8

+ 9 - 3
BFFramework/Classes/EventTrack/ViewModel/PQEventTrackViewModel.swift

@@ -93,7 +93,7 @@ public class PQEventTrackViewModel: NSObject {
         if objectType == .ot_reproduce_clickButton || objectType == .ot_reproduce_collectionBar || objectType == .ot_reproduce_collectionClicButton || objectType == .ot_reproduce_sameSourceButton {
             PQEventTrackViewModel.baseReportUpload(businessType: businessType, objectType: objectType, pageSource: pageSource != nil ? pageSource! : (videoData?.pageSource ?? .sp_category), extParams: tempExtParams, remindmsg: "再创作上报")
         } else {
-            PQEventTrackViewModel.reportVideoPlayUpload(reportLogType: reportLogType, videoId: "\(videoData?.id ?? 0)", headVideoId: headVideoId ?? videoData?.headVideoId, videoIds: (videoIds == nil ? "\(videoData?.id ?? 0)" : videoIds), pageSource: pageSource != nil ? pageSource! : (videoData?.pageSource ?? .sp_category), playId: playId ?? "", recommendId: videoData?.recommendId, recommendLogVO: videoData?.recommendLogVO, abInfoData: videoData?.abInfoData, measureType: videoData?.measureType, measureId: videoData?.measureId, businessType: businessType, shareId: shareId ?? "", extParams: tempExtParams, objectType: objectType)
+            PQEventTrackViewModel.reportVideoPlayUpload(reportLogType: reportLogType, videoId: "\(videoData?.id ?? 0)", headVideoId: headVideoId ?? videoData?.headVideoId, videoIds: (videoIds == nil ? "\(videoData?.id ?? 0)" : videoIds), pageSource: pageSource != nil ? pageSource! : (videoData?.pageSource ?? .sp_category), playId: playId ?? "", recommendId: videoData?.recommendId, recommendLogVO: videoData?.recommendLogVO,flowPool:videoData?.flowPool, abInfoData: videoData?.abInfoData, measureType: videoData?.measureType, measureId: videoData?.measureId, businessType: businessType, shareId: shareId ?? "", extParams: tempExtParams, objectType: objectType)
         }
     }
     
@@ -113,7 +113,7 @@ public class PQEventTrackViewModel: NSObject {
     ///   - businessType: 操作类型
     ///   - targetUid: 视频用户ID
     /// - Returns: <#description#>
-    public class func reportVideoPlayUpload(reportLogType: reportLogType, videoId: String, headVideoId: String?, videoIds: String?, pageSource: PAGESOURCE, playId: String, recommendId: String?, recommendLogVO: String?, abInfoData: String?, measureType: Int?, measureId: Int?, businessType: businessType?, targetUid: Int = 0, shareId: String = "", extParams: [String: Any]? = nil, objectType: objectType? = nil) {
+    public class func reportVideoPlayUpload(reportLogType: reportLogType, videoId: String, headVideoId: String?, videoIds: String?, pageSource: PAGESOURCE, playId: String, recommendId: String?, recommendLogVO: String?,flowPool:String?, abInfoData: String?, measureType: Int?, measureId: Int?, businessType: businessType?, targetUid: Int = 0, shareId: String = "", extParams: [String: Any]? = nil, objectType: objectType? = nil) {
         DispatchQueue.global().async {
             var params: [String: Any] = ["videoId": videoId, "pageSource": pageSource.rawValue, "playId": playId, "targetUid": targetUid]
             if measureType != nil {
@@ -128,6 +128,9 @@ public class PQEventTrackViewModel: NSObject {
             if recommendLogVO != nil, !(recommendLogVO?.isEmpty ?? true) {
                 params["recommendLogVO"] = recommendLogVO
             }
+            if flowPool != nil, (flowPool?.count ?? 0) > 0 {
+                params["flowPool"] = flowPool
+            }
             if abInfoData != nil, !(abInfoData?.isEmpty ?? true) {
                 params["abInfoData"] = abInfoData
             }
@@ -211,7 +214,7 @@ public class PQEventTrackViewModel: NSObject {
 //    /   - businessType: <#businessType description#>
 //    /   - targetUid: <#targetUid description#>
 //    /   - shareId: <#shareId description#>
-    public class func shareReportUpload(isShareVideo: Bool = true, screenType: Int = 1, videoId: String, pageSource: PAGESOURCE, recommendId: String?, recommendLogVO: String?, abInfoData: String?, measureType: Int?, measureId: Int?, businessType: businessType?, targetUid: Int?, shareId: String = "",extParams: [String: Any]? = nil) {
+    public class func shareReportUpload(isShareVideo: Bool = true, screenType: Int = 1, videoId: String, pageSource: PAGESOURCE, recommendId: String?, recommendLogVO: String?,flowPool:String?, abInfoData: String?, measureType: Int?, measureId: Int?, businessType: businessType?, targetUid: Int?, shareId: String = "",extParams: [String: Any]? = nil) {
         DispatchQueue.global().async {
             var url: String = PQENVUtil.shared.longvideoapi
             switch screenType {
@@ -258,6 +261,9 @@ public class PQEventTrackViewModel: NSObject {
             if recommendLogVO != nil, !(recommendLogVO?.isEmpty ?? true) {
                 params["recommendLogVO"] = recommendLogVO
             }
+            if flowPool != nil, (flowPool?.count ?? 0) > 0 {
+                params["flowPool"] = flowPool
+            }
             if abInfoData != nil, !(abInfoData?.isEmpty ?? true) {
                 params["abInfoData"] = abInfoData
             }

+ 5 - 0
BFFramework/Classes/PModels/PQVideoListModel.swift

@@ -21,6 +21,7 @@ public protocol BFVideoItemProtocol {
     dynamic var selectedImage: String { get set } // 图片地址
     dynamic var isSelected: Bool { get set }
     dynamic var recommendLogVO: String? { get set } // 推荐日志对象
+    dynamic var flowPool: String? { get set } // 流量池数据 eg:#1#12#5#169182931029
     dynamic var abInfoData: String? { get set } // AB
     dynamic var pageCategoryId: Int { get set } // 页面分类ID
     dynamic var version: String { get set } // 版本号
@@ -164,6 +165,7 @@ open class PQVideoListModel: PQBaseModel, BFVideoItemProtocol {
     public var pwd: String? // 视频密码 ,
     public var recommendId: String? // 推荐链路ID ,
     public var recommendSource: Int = 0 // 0 默认 1 第四范式
+    public var flowPool: String?
     public var recommendStatus: Int = 0 // 推荐状态 ,
     public var rotate: Int = 0 // 旋转角度 ,
     public var sampleJobId: String?
@@ -347,6 +349,9 @@ open class PQVideoListModel: PQBaseModel, BFVideoItemProtocol {
         if jsonDict.keys.contains("abInfoData") {
             abInfoData = "\(jsonDict["abInfoData"] ?? "")"
         }
+        if jsonDict.keys.contains("flowPool") {
+            flowPool = "\(jsonDict["flowPool"] ?? "")"
+        }
         if jsonDict.keys.contains("totalTime") {
             totalTime = Int("\(jsonDict["totalTime"] ?? "0")") ?? 0
             totalTimeParas = Float64(totalTime).formatDurationToHMS()