Browse Source

账户日报-广告场景

yangzian 3 years ago
parent
commit
81219003b8

+ 470 - 0
job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/data/entity/KuaishouAccountAdSceneReportDaily.java

@@ -0,0 +1,470 @@
+package cn.com.ctop.job.kuaishou.data.entity;
+
+import cn.com.ctop.job.kuaishou.data.utils.DateUtils;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+import java.math.BigDecimal;
+
+/**
+ * 快手-账户日报-adScene:按广告场景
+ *
+ * @author zian Y
+ * @date 2022-01-06
+ * @version V1.0
+ */
+@Data
+@TableName("kuaishou_account_ad_scene_report_daily")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "kuaishou_account_ad_scene_report_daily对象", description = "快手-账户日报-adScene:按广告场景")
+public class KuaishouAccountAdSceneReportDaily {
+
+  /** 广告主id */
+  @ApiModelProperty(value = "广告主id")
+  private Long advertiserId;
+  /** 数据日期,格式:YYYYMMDD */
+  @ApiModelProperty(value = "数据日期,格式:YYYYMMDD")
+  private Integer statDate;
+  /** 花费(元) */
+  @ApiModelProperty(value = "花费(元)")
+  private BigDecimal charge;
+  /** 封面曝光数 */
+  @ApiModelProperty(value = "封面曝光数")
+  private Long show;
+  /** 封面点击数 */
+  @ApiModelProperty(value = "封面点击数")
+  private Long photoClick;
+  /** 素材曝光数 */
+  @ApiModelProperty(value = "素材曝光数")
+  private Long aclick;
+  /** 行为数 */
+  @ApiModelProperty(value = "行为数")
+  private Long bclick;
+  /** 封面点击率 */
+  @ApiModelProperty(value = "封面点击率")
+  private BigDecimal photoClickRatio;
+  /** 3s播放率 */
+  @ApiModelProperty(value = "3s播放率")
+  private BigDecimal play3sRatio;
+  /** 行为率 */
+  @ApiModelProperty(value = "行为率")
+  private BigDecimal actionRatio;
+  /** 平均千次曝光花费(元) */
+  @Excel(name = "平均千次曝光花费(元)", width = 15)
+  @ApiModelProperty(value = "平均千次曝光花费(元)")
+  private BigDecimal impression1kCost;
+  /** 平均点击单价(元) */
+  @Excel(name = "平均点击单价(元)", width = 15)
+  @ApiModelProperty(value = "平均点击单价(元)")
+  private BigDecimal photoClickCost;
+  /** 平均行为单价(元) */
+  @Excel(name = "平均行为单价(元)", width = 15)
+  @ApiModelProperty(value = "平均行为单价(元)")
+  private BigDecimal actionCost;
+  /** 分享数 */
+  @Excel(name = "分享数", width = 15)
+  @ApiModelProperty(value = "分享数")
+  private Long share;
+  /** 评论数 */
+  @Excel(name = "评论数", width = 15)
+  @ApiModelProperty(value = "评论数")
+  private Long comment;
+  /** 点赞数 */
+  @Excel(name = "点赞数", width = 15)
+  @ApiModelProperty(value = "点赞数")
+  private Long like;
+  /** 新增关注数 */
+  @Excel(name = "新增关注数", width = 15)
+  @ApiModelProperty(value = "新增关注数")
+  private Long follow;
+  /** 取消关注数 */
+  @Excel(name = "取消关注数", width = 15)
+  @ApiModelProperty(value = "取消关注数")
+  private Long cancelFollow;
+  /** 举报数 */
+  @Excel(name = "举报数", width = 15)
+  @ApiModelProperty(value = "举报数")
+  private Long report;
+  /** 拉黑数 */
+  @Excel(name = "拉黑数", width = 15)
+  @ApiModelProperty(value = "拉黑数")
+  private Long block;
+  /** 减少此类作品数 */
+  @Excel(name = "减少此类作品数", width = 15)
+  @ApiModelProperty(value = "减少此类作品数")
+  private Long negative;
+  /** 提交按钮点击数(历史字段,同下方“表单提交数”,预计年底删除该字段) */
+  @Excel(name = "提交按钮点击数(历史字段,同下方“表单提交数”,预计年底删除该字段)", width = 15)
+  @ApiModelProperty(value = "提交按钮点击数(历史字段,同下方“表单提交数”,预计年底删除该字段)")
+  private Long submit;
+  /** 应用下载数据-安卓下载开始数 */
+  @Excel(name = "应用下载数据-安卓下载开始数", width = 15)
+  @ApiModelProperty(value = "应用下载数据-安卓下载开始数")
+  private Long downloadStarted;
+  /** 应用下载数据-安卓下载完成数 */
+  @Excel(name = "应用下载数据-安卓下载完成数", width = 15)
+  @ApiModelProperty(value = "应用下载数据-安卓下载完成数")
+  private Long downloadCompleted;
+  /** 应用下载数据-激活数 */
+  @Excel(name = "应用下载数据-激活数", width = 15)
+  @ApiModelProperty(value = "应用下载数据-激活数")
+  private Long activation;
+  /** 应用下载数据-首日付费次数 */
+  @Excel(name = "应用下载数据-首日付费次数", width = 15)
+  @ApiModelProperty(value = "应用下载数据-首日付费次数")
+  private Long eventPayFirstDay;
+  /** 应用下载数据-首日付费金额 */
+  @Excel(name = "应用下载数据-首日付费金额", width = 15)
+  @ApiModelProperty(value = "应用下载数据-首日付费金额")
+  private BigDecimal eventPayPurchaseAmountFirstDay;
+  /** 应用下载数据-首日ROI */
+  @Excel(name = "应用下载数据-首日ROI", width = 15)
+  @ApiModelProperty(value = "应用下载数据-首日ROI")
+  private BigDecimal eventPayFirstDayRoi;
+  /** 应用下载数据-付费次数 */
+  @Excel(name = "应用下载数据-付费次数", width = 15)
+  @ApiModelProperty(value = "应用下载数据-付费次数")
+  private Long eventPay;
+  /** 应用下载数据-付费金额 */
+  @Excel(name = "应用下载数据-付费金额", width = 15)
+  @ApiModelProperty(value = "应用下载数据-付费金额")
+  private BigDecimal eventPayPurchaseAmount;
+  /** 应用下载数据-ROI */
+  @Excel(name = "应用下载数据-ROI", width = 15)
+  @ApiModelProperty(value = "应用下载数据-ROI")
+  private BigDecimal eventPayRoi;
+  /** 应用下载数据-注册数 */
+  @Excel(name = "应用下载数据-注册数", width = 15)
+  @ApiModelProperty(value = "应用下载数据-注册数")
+  private Long eventRegister;
+  /** 应用下载数据-注册成本 */
+  @Excel(name = "应用下载数据-注册成本", width = 15)
+  @ApiModelProperty(value = "应用下载数据-注册成本")
+  private BigDecimal eventRegisterCost;
+  /** 应用下载数据-注册率 */
+  @Excel(name = "应用下载数据-注册率", width = 15)
+  @ApiModelProperty(value = "应用下载数据-注册率")
+  private BigDecimal eventRegisterRatio;
+  /** 应用下载数据-完件数 */
+  @Excel(name = "应用下载数据-完件数", width = 15)
+  @ApiModelProperty(value = "应用下载数据-完件数")
+  private Long eventJinJianApp;
+  /** 应用下载数据-完件成本 */
+  @Excel(name = "应用下载数据-完件成本", width = 15)
+  @ApiModelProperty(value = "应用下载数据-完件成本")
+  private BigDecimal eventJinJianAppCost;
+  /** 应用下载数据-授信数 */
+  @Excel(name = "应用下载数据-授信数", width = 15)
+  @ApiModelProperty(value = "应用下载数据-授信数")
+  private Long eventCreditGrantApp;
+  /** 应用下载数据-授信成本 */
+  @Excel(name = "应用下载数据-授信成本", width = 15)
+  @ApiModelProperty(value = "应用下载数据-授信成本")
+  private BigDecimal eventCreditGrantAppCost;
+  /** 应用下载数据-授信率 */
+  @Excel(name = "应用下载数据-授信率", width = 15)
+  @ApiModelProperty(value = "应用下载数据-授信率")
+  private BigDecimal eventCreditGrantAppRatio;
+  /** 应用下载数据-付款成功数 */
+  @Excel(name = "应用下载数据-付款成功数", width = 15)
+  @ApiModelProperty(value = "应用下载数据-付款成功数")
+  private Long eventOrderPaid;
+  /** 应用下载数据-付款成功金额 */
+  @Excel(name = "应用下载数据-付款成功金额", width = 15)
+  @ApiModelProperty(value = "应用下载数据-付款成功金额")
+  private BigDecimal eventOrderPaidPurchaseAmount;
+  /** 应用下载数据-单次付款成本 */
+  @Excel(name = "应用下载数据-单次付款成本", width = 15)
+  @ApiModelProperty(value = "应用下载数据-单次付款成本")
+  private BigDecimal eventOrderPaidCost;
+  /** 应用下载数据-次留数(仅支持分日查询) */
+  @Excel(name = "应用下载数据-次留数(仅支持分日查询)", width = 15)
+  @ApiModelProperty(value = "应用下载数据-次留数(仅支持分日查询)")
+  private Long eventNextDayStay;
+  /** 应用下载数据-次留成本(仅支持分日查询) */
+  @Excel(name = "应用下载数据-次留成本(仅支持分日查询)", width = 15)
+  @ApiModelProperty(value = "应用下载数据-次留成本(仅支持分日查询)")
+  private BigDecimal eventNextDayStayCost;
+  /** 应用下载数据-次留率(仅支持分日查询) */
+  @Excel(name = "应用下载数据-次留率(仅支持分日查询)", width = 15)
+  @ApiModelProperty(value = "应用下载数据-次留率(仅支持分日查询)")
+  private BigDecimal eventNextDayStayRatio;
+  /** 落地页数据-表单提交数 */
+  @Excel(name = "落地页数据-表单提交数", width = 15)
+  @ApiModelProperty(value = "落地页数据-表单提交数")
+  private Long formCount;
+  /** 落地页数据-表单提交单价 */
+  @Excel(name = "落地页数据-表单提交单价", width = 15)
+  @ApiModelProperty(value = "落地页数据-表单提交单价")
+  private BigDecimal formCost;
+  /** 落地页数据-表单提交点击率 */
+  @Excel(name = "落地页数据-表单提交点击率", width = 15)
+  @ApiModelProperty(value = "落地页数据-表单提交点击率")
+  private BigDecimal formActionRatio;
+  /** 落地页数据-落地页完件数 */
+  @Excel(name = "落地页数据-落地页完件数", width = 15)
+  @ApiModelProperty(value = "落地页数据-落地页完件数")
+  private Long eventJinJianLandingPage;
+  /** 落地页数据-落地页完件成本 */
+  @Excel(name = "落地页数据-落地页完件成本", width = 15)
+  @ApiModelProperty(value = "落地页数据-落地页完件成本")
+  private BigDecimal eventJinJianLandingPageCost;
+  /** 落地页数据-落地页授信数 */
+  @Excel(name = "落地页数据-落地页授信数", width = 15)
+  @ApiModelProperty(value = "落地页数据-落地页授信数")
+  private Long eventCreditGrantLandingPage;
+  /** 落地页数据-落地页授信成本 */
+  @Excel(name = "落地页数据-落地页授信成本", width = 15)
+  @ApiModelProperty(value = "落地页数据-落地页授信成本")
+  private BigDecimal eventCreditGrantLandingPageCost;
+  /** 落地页数据-落地页授信率 */
+  @Excel(name = "落地页数据-落地页授信率", width = 15)
+  @ApiModelProperty(value = "落地页数据-落地页授信率")
+  private BigDecimal eventCreditGrantLandingPageRatio;
+  /** 落地页数据-有效线索数 */
+  @Excel(name = "落地页数据-有效线索数", width = 15)
+  @ApiModelProperty(value = "落地页数据-有效线索数")
+  private Long eventValidClues;
+  /** 落地页数据-有效线索成本 */
+  @Excel(name = "落地页数据-有效线索成本", width = 15)
+  @ApiModelProperty(value = "落地页数据-有效线索成本")
+  private BigDecimal eventValidCluesCost;
+  /** 微信复制数 */
+  @Excel(name = "微信复制数", width = 15)
+  @ApiModelProperty(value = "微信复制数")
+  private Long eventAddWechat;
+  /** 微信复制成本 */
+  @Excel(name = "微信复制成本", width = 15)
+  @ApiModelProperty(value = "微信复制成本")
+  private BigDecimal eventAddWechatCost;
+  /** 微信复制率 */
+  @Excel(name = "微信复制率", width = 15)
+  @ApiModelProperty(value = "微信复制率")
+  private BigDecimal eventAddWechatRatio;
+  /** 智能电话-确认接通数 */
+  @Excel(name = "智能电话-确认接通数", width = 15)
+  @ApiModelProperty(value = "智能电话-确认接通数")
+  private Long eventGetThrough;
+  /** 智能电话-确认接通成本 */
+  @Excel(name = "智能电话-确认接通成本", width = 15)
+  @ApiModelProperty(value = "智能电话-确认接通成本")
+  private BigDecimal eventGetThroughCost;
+  /** 智能电话-确认接通率 */
+  @Excel(name = "智能电话-确认接通率", width = 15)
+  @ApiModelProperty(value = "智能电话-确认接通率")
+  private BigDecimal eventGetThroughRatio;
+
+  private Long eventAppInvoked;
+  private BigDecimal eventAppInvokedCost;
+  private BigDecimal eventAppInvokedRatio;
+  private Long unionEventPayPurchaseAmount7d;
+  private BigDecimal unionEventPayPurchaseAmount7dRoi;
+  private String placementType;
+  private String adScene;
+  private Long eventOrderSuccessed;
+  private BigDecimal adPhotoPlayed10sRatio;
+  private BigDecimal keyActionCost;
+  private BigDecimal eventAddShoppingCartCost;
+  private BigDecimal eventAdWatchTimesRatio;
+  private BigDecimal eventOutboundCallCost;
+  private Long eventOutboundCall;
+  private BigDecimal actionNewRatio;
+  private Long eventWatchAppAd;
+  private BigDecimal eventMultiConversionCost;
+  private Long eventPhoneCardActivate;
+  private BigDecimal adPhotoPlayed75percentRatio;
+  private BigDecimal keyActionRatio;
+  private BigDecimal eventAdWatchTimesCost;
+  private Long eventAddShoppingCart;
+  private Long keyAction;
+  private Long eventMultiConversion;
+  private Long eventWechatConnected;
+  private Long eventDspGiftForm;
+  private Long eventIntentionConfirmed;
+  private Long eventPhoneGetThrough;
+  private BigDecimal eventMultiConversionRatio;
+  private BigDecimal eventMeasurementHouse;
+  private BigDecimal adPhotoPlayed2sRatio;
+  private BigDecimal eventOutboundCallRatio;
+  private Long eventAdWatchTimes;
+  private BigDecimal play5sRatio;
+  private BigDecimal playEndRatio;
+  private BigDecimal eventNewUserPay;
+  private BigDecimal eventNewUserPayCost;
+  private BigDecimal eventNewUserPayRatio;
+  private BigDecimal click1kCost;
+  private Long adProductCnt;
+  private Long eventGoodsView;
+  private Long merchantRecoFans;
+  private BigDecimal eventOrderAmountRoi;
+  private BigDecimal eventGoodsViewCost;
+  private BigDecimal merchantRecoFansCost;
+  private Long eventButtonClick;
+  private BigDecimal eventButtonClickCost;
+  private BigDecimal eventButtonClickRatio;
+  private BigDecimal eventOrderPaidRoi;
+  private Long eventNewUserJinjianApp;
+  private BigDecimal eventNewUserJinjianAppCost;
+  private BigDecimal eventNewUserJinjianAppRoi;
+  private Long eventNewUserCreditGrantApp;
+  private BigDecimal eventNewUserCreditGrantAppCost;
+  private BigDecimal eventNewUserCreditGrantAppRoi;
+  private Long eventNewUserJinjianPage;
+  private BigDecimal eventNewUserJinjianPageCost;
+  private BigDecimal eventNewUserJinjianPageRoi;
+  private Long eventNewUserCreditGrantPage;
+  private BigDecimal eventNewUserCreditGrantPageCost;
+  private BigDecimal eventNewUserCreditGrantPageRoi;
+  private Long eventAppointForm;
+  private BigDecimal eventAppointFormCost;
+  private BigDecimal eventAppointFormRatio;
+  private Long eventAppointJumpClick;
+  private BigDecimal eventAppointJumpClickCost;
+  private BigDecimal eventAppointJumpClickRatio;
+  private BigDecimal eventCreditGrantLandingRatio;
+
+
+
+  public static KuaishouAccountAdSceneReportDaily getKuaishouAccountAdsecneInfo(JSONObject returnJson){
+    KuaishouAccountAdSceneReportDaily reportDaily = new KuaishouAccountAdSceneReportDaily();
+    reportDaily.setAdvertiserId(returnJson.getLong("advertiser_id"));
+    reportDaily.setStatDate(DateUtils.getDateInteger(returnJson.getString("stat_date")));
+    reportDaily.setCharge(returnJson.getBigDecimal("charge"));
+    reportDaily.setShow(returnJson.getLong("show"));
+    reportDaily.setPhotoClick(returnJson.getLong("photo_click"));
+    reportDaily.setAclick(returnJson.getLong("aclick"));
+    reportDaily.setBclick(returnJson.getLong("bclick"));
+    reportDaily.setPhotoClickRatio(returnJson.getBigDecimal("photo_click_ratio"));
+    reportDaily.setPlay3sRatio(returnJson.getBigDecimal("play_3s_ratio"));
+    reportDaily.setActionRatio(returnJson.getBigDecimal("action_ratio"));
+    reportDaily.setImpression1kCost(returnJson.getBigDecimal("impression_1k_cost"));
+    reportDaily.setPhotoClickCost(returnJson.getBigDecimal("photo_click_cost"));
+    reportDaily.setActionCost(returnJson.getBigDecimal("action_cost"));
+    reportDaily.setShare(returnJson.getLong("share"));
+    reportDaily.setComment(returnJson.getLong("comment"));
+    reportDaily.setLike(returnJson.getLong("like"));
+    reportDaily.setFollow(returnJson.getLong("follow"));
+    reportDaily.setCancelFollow(returnJson.getLong("cancel_follow"));
+    reportDaily.setReport(returnJson.getLong("report"));
+    reportDaily.setBlock(returnJson.getLong("block"));
+    reportDaily.setNegative(returnJson.getLong("negative"));
+    reportDaily.setSubmit(returnJson.getLong("submit"));
+    reportDaily.setDownloadStarted(returnJson.getLong("download_started"));
+    reportDaily.setDownloadCompleted(returnJson.getLong("download_completed"));
+    reportDaily.setActivation(returnJson.getLong("activation"));
+    reportDaily.setEventPayFirstDay(returnJson.getLong("event_pay_first_day"));
+    reportDaily.setEventPayPurchaseAmountFirstDay(returnJson.getBigDecimal("event_pay_purchase_amount_first_day"));
+    reportDaily.setEventPayFirstDayRoi(returnJson.getBigDecimal("event_pay_first_day_roi"));
+    reportDaily.setEventPay(returnJson.getLong("event_pay"));
+    reportDaily.setEventPayPurchaseAmount(returnJson.getBigDecimal("event_pay_purchase_amount"));
+    reportDaily.setEventPayRoi(returnJson.getBigDecimal("event_pay_roi"));
+    reportDaily.setEventRegister(returnJson.getLong("event_register"));
+    reportDaily.setEventRegisterCost(returnJson.getBigDecimal("event_register_cost"));
+    reportDaily.setEventRegisterRatio(returnJson.getBigDecimal("event_register_ratio"));
+    reportDaily.setEventJinJianApp(returnJson.getLong("event_jin_jian_app"));
+    reportDaily.setEventJinJianAppCost(returnJson.getBigDecimal("event_jin_jian_app_cost"));
+    reportDaily.setEventCreditGrantApp(returnJson.getLong("event_credit_grant_app"));
+    reportDaily.setEventCreditGrantAppCost(returnJson.getBigDecimal("event_credit_grant_app_cost"));
+    reportDaily.setEventCreditGrantAppRatio(returnJson.getBigDecimal("event_credit_grant_app_ratio"));
+    reportDaily.setEventOrderPaid(returnJson.getLong("event_order_paid"));
+    reportDaily.setEventOrderPaidPurchaseAmount(returnJson.getBigDecimal("event_order_paid_purchase_amount"));
+    reportDaily.setEventOrderPaidCost(returnJson.getBigDecimal("event_order_paid_cost"));
+    reportDaily.setEventNextDayStay(returnJson.getLong("event_next_day_stay"));
+    reportDaily.setEventNextDayStayCost(returnJson.getBigDecimal("event_next_day_stay_cost"));
+    reportDaily.setEventNextDayStayRatio(returnJson.getBigDecimal("event_next_day_stay_ratio"));
+    reportDaily.setFormCount(returnJson.getLong("form_count"));
+    reportDaily.setFormCost(returnJson.getBigDecimal("form_cost"));
+    reportDaily.setFormActionRatio(returnJson.getBigDecimal("form_action_ratio"));
+    reportDaily.setEventJinJianLandingPage(returnJson.getLong("event_jin_jian_landing_page"));
+    reportDaily.setEventJinJianLandingPageCost(returnJson.getBigDecimal("event_jin_jian_landing_page_cost"));
+    reportDaily.setEventCreditGrantLandingPage(returnJson.getLong("event_credit_grant_landing_page"));
+    reportDaily.setEventCreditGrantLandingPageCost(returnJson.getBigDecimal("event_credit_grant_landing_page_cost"));
+    reportDaily.setEventCreditGrantLandingPageRatio(returnJson.getBigDecimal("event_credit_grant_landing_page_ratio"));
+    reportDaily.setEventValidClues(returnJson.getLong("event_valid_clues"));
+    reportDaily.setEventValidCluesCost(returnJson.getBigDecimal("event_valid_clues_cost"));
+    reportDaily.setEventAddWechat(returnJson.getLong("event_add_wechat"));
+    reportDaily.setEventAddWechatCost(returnJson.getBigDecimal("event_add_wechat_cost"));
+    reportDaily.setEventAddWechatRatio(returnJson.getBigDecimal("event_add_wechat_ratio"));
+    reportDaily.setEventGetThrough(returnJson.getLong("event_get_through"));
+    reportDaily.setEventGetThroughCost(returnJson.getBigDecimal("event_get_through_cost"));
+    reportDaily.setEventGetThroughRatio(returnJson.getBigDecimal("event_get_through_ratio"));
+    reportDaily.setEventAppInvoked(returnJson.getLong("event_app_invoked"));
+    reportDaily.setEventAppInvokedCost(returnJson.getBigDecimal("event_app_invoked_cost"));
+    reportDaily.setEventAppInvokedRatio(returnJson.getBigDecimal("event_app_invoked_ratio"));
+    reportDaily.setEventCreditGrantLandingRatio(returnJson.getBigDecimal("event_credit_grant_landing_ratio"));
+    reportDaily.setPlay5sRatio(returnJson.getBigDecimal("play_5s_ratio"));
+    reportDaily.setPlayEndRatio(returnJson.getBigDecimal("play_end_ratio"));
+    reportDaily.setEventNewUserPay(returnJson.getBigDecimal("event_new_user_pay"));
+    reportDaily.setEventNewUserPayCost(returnJson.getBigDecimal("event_new_user_pay_cost"));
+    reportDaily.setEventNewUserPayRatio(returnJson.getBigDecimal("event_new_user_pay_ratio"));
+    reportDaily.setClick1kCost(returnJson.getBigDecimal("click_1k_cost"));
+    reportDaily.setAdProductCnt(returnJson.getLong("ad_product_cnt"));
+    reportDaily.setEventGoodsView(returnJson.getLong("event_goods_view"));
+    reportDaily.setMerchantRecoFans(returnJson.getLong("merchant_reco_fans"));
+    reportDaily.setEventGoodsViewCost(returnJson.getBigDecimal("event_goods_view_cost"));
+    reportDaily.setMerchantRecoFansCost(returnJson.getBigDecimal("merchant_reco_fans_cost"));
+    reportDaily.setEventOrderAmountRoi(returnJson.getBigDecimal("event_order_amount_roi"));
+    reportDaily.setEventButtonClick(returnJson.getLong("event_button_click"));
+    reportDaily.setEventButtonClickCost(returnJson.getBigDecimal("event_button_click_cost"));
+    reportDaily.setEventButtonClickRatio(returnJson.getBigDecimal("event_button_click_ratio"));
+    reportDaily.setEventOrderPaidRoi(returnJson.getBigDecimal("event_order_paid_roi"));
+    reportDaily.setEventNewUserJinjianApp(returnJson.getLong("event_new_user_jinjian_app"));
+    reportDaily.setEventNewUserJinjianAppCost(returnJson.getBigDecimal("event_new_user_jinjian_app_cost"));
+    reportDaily.setEventNewUserJinjianAppRoi(returnJson.getBigDecimal("event_new_user_jinjian_app_roi"));
+    reportDaily.setEventNewUserCreditGrantApp(returnJson.getLong("event_new_user_credit_grant_app"));
+    reportDaily.setEventNewUserCreditGrantAppCost(returnJson.getBigDecimal("event_new_user_credit_grant_app_cost"));
+    reportDaily.setEventNewUserCreditGrantAppRoi(returnJson.getBigDecimal("event_new_user_credit_grant_app_roi"));
+    reportDaily.setEventNewUserJinjianPage(returnJson.getLong("event_new_user_jinjian_page"));
+    reportDaily.setEventNewUserJinjianPageCost(returnJson.getBigDecimal("event_new_user_jinjian_page_cost"));
+    reportDaily.setEventNewUserJinjianPageRoi(returnJson.getBigDecimal("event_new_user_jinjian_page_roi"));
+    reportDaily.setEventNewUserCreditGrantPage(returnJson.getLong("event_new_user_credit_grant_page"));
+    reportDaily.setEventNewUserCreditGrantPageCost(returnJson.getBigDecimal("event_new_user_credit_grant_page_cost"));
+    reportDaily.setEventNewUserCreditGrantPageRoi(returnJson.getBigDecimal("event_new_user_credit_grant_page_roi"));
+    reportDaily.setEventAppointForm(returnJson.getLong("event_appoint_form"));
+    reportDaily.setEventAppointFormCost(returnJson.getBigDecimal("event_appoint_form_cost"));
+    reportDaily.setEventAppointFormRatio(returnJson.getBigDecimal("event_appoint_form_ratio"));
+    reportDaily.setEventAppointJumpClick(returnJson.getLong("event_appoint_jump_click"));
+    reportDaily.setEventAppointJumpClickCost(returnJson.getBigDecimal("event_appoint_jump_click_cost"));
+    reportDaily.setEventAppointJumpClickRatio(returnJson.getBigDecimal("event_appoint_jump_click_ratio"));
+    reportDaily.setUnionEventPayPurchaseAmount7d(returnJson.getLong("union_event_pay_purchase_amount_7d"));
+    reportDaily.setUnionEventPayPurchaseAmount7dRoi(returnJson.getBigDecimal("union_event_pay_purchase_amount_7d_roi"));
+    reportDaily.setPlacementType(returnJson.getString("placement_type"));
+    reportDaily.setAdScene(returnJson.getString("ad_scene"));
+    reportDaily.setEventOrderSuccessed(returnJson.getLong("event_order_successed"));
+    reportDaily.setAdPhotoPlayed10sRatio(returnJson.getBigDecimal("ad_photo_played_10s_ratio"));
+    reportDaily.setKeyActionCost(returnJson.getBigDecimal("key_action_cost"));
+    reportDaily.setEventAddShoppingCartCost(returnJson.getBigDecimal("event_add_shopping_cart_cost"));
+    reportDaily.setEventAdWatchTimesRatio(returnJson.getBigDecimal("event_ad_watch_times_ratio"));
+    reportDaily.setEventOutboundCallCost(returnJson.getBigDecimal("event_outbound_call_cost"));
+    reportDaily.setEventOutboundCall(returnJson.getLong("event_outbound_call"));
+    reportDaily.setActionNewRatio(returnJson.getBigDecimal("action_new_ratio"));
+    reportDaily.setEventWatchAppAd(returnJson.getLong("event_watch_app_ad"));
+    reportDaily.setEventMultiConversionCost(returnJson.getBigDecimal("event_multi_conversion_cost"));
+    reportDaily.setEventPhoneCardActivate(returnJson.getLong("event_phone_card_activate"));
+    reportDaily.setAdPhotoPlayed75percentRatio(returnJson.getBigDecimal("ad_photo_played_75percent_ratio"));
+    //  reportDaily.setKeyActionRatio(returnJson.getBigDecimal("key_action_ratio"));
+    reportDaily.setEventAdWatchTimesCost(returnJson.getBigDecimal("event_ad_watch_times_cost"));
+    reportDaily.setEventAddShoppingCart(returnJson.getLong("event_add_shopping_cart"));
+    reportDaily.setKeyAction(returnJson.getLong("key_action"));
+    reportDaily.setEventMultiConversion(returnJson.getLong("event_multi_conversion"));
+    reportDaily.setEventWechatConnected(returnJson.getLong("event_wechat_connected"));
+    reportDaily.setEventDspGiftForm(returnJson.getLong("event_dsp_gift_form"));
+    reportDaily.setEventIntentionConfirmed(returnJson.getLong("event_intention_confirmed"));
+    reportDaily.setEventPhoneGetThrough(returnJson.getLong("event_phone_get_through"));
+    reportDaily.setEventMultiConversionRatio(returnJson.getBigDecimal("event_multi_conversion_ratio"));
+    reportDaily.setEventMeasurementHouse(returnJson.getBigDecimal("event_measurement_house"));
+    reportDaily.setAdPhotoPlayed2sRatio(returnJson.getBigDecimal("ad_photo_played_2s_ratio"));
+    reportDaily.setEventOutboundCallRatio(returnJson.getBigDecimal("event_outbound_call_ratio"));
+    reportDaily.setEventAdWatchTimes(returnJson.getLong("event_ad_watch_times"));
+    return reportDaily;
+  }
+
+
+}

+ 22 - 0
job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/data/mapper/KuaishouAccountAdSceneReportDailyMapper.java

@@ -0,0 +1,22 @@
+package cn.com.ctop.job.kuaishou.data.mapper;
+
+import cn.com.ctop.job.kuaishou.data.entity.KuaishouAccountAdSceneReportDaily;
+import cn.com.ctop.job.kuaishou.data.entity.KuaishouAccountReportDaily;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 快手-账户日报-adScene
+ *
+ * @author zian Y
+ *   2022-01-06
+ * @version V1.0
+ */
+public interface KuaishouAccountAdSceneReportDailyMapper extends BaseMapper<KuaishouAccountAdSceneReportDaily> {
+
+  //快手-账户日报-按广告场景
+  void replaceBatchKsAccountAdScene(@Param("addList") List<KuaishouAccountAdSceneReportDaily> addList);
+
+}

+ 275 - 0
job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/data/mapper/xml/KuaishouAccountAdSceneReportDailyMapper.xml

@@ -0,0 +1,275 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.com.ctop.job.kuaishou.data.mapper.KuaishouAccountAdSceneReportDailyMapper">
+
+    <!-- 快手-账户日报-按广告场景-->
+    <insert id="replaceBatchKsAccountAdScene">
+        replace into kuaishou_account_ad_scene_report_daily(
+        `advertiser_id`,
+        `stat_date`,
+        `charge`,
+        `show`,
+        `photo_click`,
+        `aclick`,
+        `bclick`,
+        `photo_click_ratio`,
+        `play_3s_ratio`,
+        `action_ratio`,
+        `impression_1k_cost`,
+        `photo_click_cost`,
+        `action_cost`,
+        `share`,
+        `comment`,
+        `like`,
+        `follow`,
+        `cancel_follow`,
+        `report`,
+        `block`,
+        `negative`,
+        `submit`,
+        `download_started`,
+        `download_completed`,
+        `activation`,
+        `event_pay_first_day`,
+        `event_pay_purchase_amount_first_day`,
+        `event_pay_first_day_roi`,
+        `event_pay`,
+        `event_pay_purchase_amount`,
+        `event_pay_roi`,
+        `event_register`,
+        `event_register_cost`,
+        `event_register_ratio`,
+        `event_jin_jian_app`,
+        `event_jin_jian_app_cost`,
+        `event_credit_grant_app`,
+        `event_credit_grant_app_cost`,
+        `event_credit_grant_app_ratio`,
+        `event_order_paid`,
+        `event_order_paid_purchase_amount`,
+        `event_order_paid_cost`,
+        `event_next_day_stay`,
+        `event_next_day_stay_cost`,
+        `event_next_day_stay_ratio`,
+        `form_count`,
+        `form_cost`,
+        `form_action_ratio`,
+        `event_jin_jian_landing_page`,
+        `event_jin_jian_landing_page_cost`,
+        `event_credit_grant_landing_page`,
+        `event_credit_grant_landing_page_cost`,
+        `event_credit_grant_landing_page_ratio`,
+        `event_valid_clues`,
+        `event_valid_clues_cost`,
+        `event_add_wechat`,
+        `event_add_wechat_cost`,
+        `event_add_wechat_ratio`,
+        `event_get_through`,
+        `event_get_through_cost`,
+        `event_get_through_ratio`,
+        `event_app_invoked`,
+        `event_app_invoked_cost`,
+        `event_app_invoked_ratio`,
+        `event_credit_grant_landing_ratio`,
+        `play_5s_ratio`,
+        `play_end_ratio`,
+        `event_new_user_pay`,
+        `event_new_user_pay_cost`,
+        `event_new_user_pay_ratio`,
+        `click_1k_cost`,
+        `ad_product_cnt`,
+        `event_goods_view`,
+        `merchant_reco_fans`,
+        `event_order_amount_roi`,
+        `event_goods_view_cost`,
+        `merchant_reco_fans_cost`,
+        `event_button_click`,
+        `event_button_click_cost`,
+        `event_button_click_ratio`,
+        `event_order_paid_roi`,
+        `event_new_user_jinjian_app`,
+        `event_new_user_jinjian_app_cost`,
+        `event_new_user_jinjian_app_roi`,
+        `event_new_user_credit_grant_app`,
+        `event_new_user_credit_grant_app_cost`,
+        `event_new_user_credit_grant_app_roi`,
+        `event_new_user_jinjian_page`,
+        `event_new_user_jinjian_page_cost`,
+        `event_new_user_jinjian_page_roi`,
+        `event_new_user_credit_grant_page`,
+        `event_new_user_credit_grant_page_cost`,
+        `event_new_user_credit_grant_page_roi`,
+        `event_appoint_form`,
+        `event_appoint_form_cost`,
+        `event_appoint_form_ratio`,
+        `event_appoint_jump_click`,
+        `event_appoint_jump_click_cost`,
+        `event_appoint_jump_click_ratio`,
+        `union_event_pay_purchase_amount_7d`,
+        `union_event_pay_purchase_amount_7d_roi`,
+        `placement_type`,
+        `ad_scene`,
+        `event_order_successed`,
+        `ad_photo_played_10s_ratio`,
+        `key_action_cost`,
+        `event_add_shopping_cart_cost`,
+        `event_ad_watch_times_ratio`,
+        `event_outbound_call_cost`,
+        `event_outbound_call`,
+        `action_new_ratio`,
+        `event_watch_app_ad`,
+        `event_multi_conversion_cost`,
+        `event_phone_card_activate`,
+        `ad_photo_played_75percent_ratio`,
+        `key_action_ratio`,
+        `event_ad_watch_times_cost`,
+        `event_add_shopping_cart`,
+        `key_action`,
+        `event_multi_conversion`,
+        `event_wechat_connected`,
+        `event_dsp_gift_form`,
+        `event_intention_confirmed`,
+        `event_phone_get_through`,
+        `event_multi_conversion_ratio`,
+        `event_measurement_house`,
+        `ad_photo_played_2s_ratio`,
+        `event_outbound_call_ratio`,
+        `event_ad_watch_times`
+
+        )
+        values
+        <foreach collection="addList" item="add" separator=",">
+            (
+            #{add.advertiserId},
+            #{add.statDate},
+            #{add.charge},
+            #{add.show},
+            #{add.photoClick},
+            #{add.aclick},
+            #{add.bclick},
+            #{add.photoClickRatio},
+            #{add.play3sRatio},
+            #{add.actionRatio},
+            #{add.impression1kCost},
+            #{add.photoClickCost},
+            #{add.actionCost},
+            #{add.share},
+            #{add.comment},
+            #{add.like},
+            #{add.follow},
+            #{add.cancelFollow},
+            #{add.report},
+            #{add.block},
+            #{add.negative},
+            #{add.submit},
+            #{add.downloadStarted},
+            #{add.downloadCompleted},
+            #{add.activation},
+            #{add.eventPayFirstDay},
+            #{add.eventPayPurchaseAmountFirstDay},
+            #{add.eventPayFirstDayRoi},
+            #{add.eventPay},
+            #{add.eventPayPurchaseAmount},
+            #{add.eventPayRoi},
+            #{add.eventRegister},
+            #{add.eventRegisterCost},
+            #{add.eventRegisterRatio},
+            #{add.eventJinJianApp},
+            #{add.eventJinJianAppCost},
+            #{add.eventCreditGrantApp},
+            #{add.eventCreditGrantAppCost},
+            #{add.eventCreditGrantAppRatio},
+            #{add.eventOrderPaid},
+            #{add.eventOrderPaidPurchaseAmount},
+            #{add.eventOrderPaidCost},
+            #{add.eventNextDayStay},
+            #{add.eventNextDayStayCost},
+            #{add.eventNextDayStayRatio},
+            #{add.formCount},
+            #{add.formCost},
+            #{add.formActionRatio},
+            #{add.eventJinJianLandingPage},
+            #{add.eventJinJianLandingPageCost},
+            #{add.eventCreditGrantLandingPage},
+            #{add.eventCreditGrantLandingPageCost},
+            #{add.eventCreditGrantLandingPageRatio},
+            #{add.eventValidClues},
+            #{add.eventValidCluesCost},
+            #{add.eventAddWechat},
+            #{add.eventAddWechatCost},
+            #{add.eventAddWechatRatio},
+            #{add.eventGetThrough},
+            #{add.eventGetThroughCost},
+            #{add.eventGetThroughRatio},
+            #{add.eventAppInvoked},
+            #{add.eventAppInvokedCost},
+            #{add.eventAppInvokedRatio},
+            #{add.eventCreditGrantLandingRatio},
+            #{add.play5sRatio},
+            #{add.playEndRatio},
+            #{add.eventNewUserPay},
+            #{add.eventNewUserPayCost},
+            #{add.eventNewUserPayRatio},
+            #{add.click1kCost},
+            #{add.adProductCnt},
+            #{add.eventGoodsView},
+            #{add.merchantRecoFans},
+            #{add.eventOrderAmountRoi},
+            #{add.eventGoodsViewCost},
+            #{add.merchantRecoFansCost},
+            #{add.eventButtonClick},
+            #{add.eventButtonClickCost},
+            #{add.eventButtonClickRatio},
+            #{add.eventOrderPaidRoi},
+            #{add.eventNewUserJinjianApp},
+            #{add.eventNewUserJinjianAppCost},
+            #{add.eventNewUserJinjianAppRoi},
+            #{add.eventNewUserCreditGrantApp},
+            #{add.eventNewUserCreditGrantAppCost},
+            #{add.eventNewUserCreditGrantAppRoi},
+            #{add.eventNewUserJinjianPage},
+            #{add.eventNewUserJinjianPageCost},
+            #{add.eventNewUserJinjianPageRoi},
+            #{add.eventNewUserCreditGrantPage},
+            #{add.eventNewUserCreditGrantPageCost},
+            #{add.eventNewUserCreditGrantPageRoi},
+            #{add.eventAppointForm},
+            #{add.eventAppointFormCost},
+            #{add.eventAppointFormRatio},
+            #{add.eventAppointJumpClick},
+            #{add.eventAppointJumpClickCost},
+            #{add.eventAppointJumpClickRatio},
+            #{add.unionEventPayPurchaseAmount7d},
+            #{add.unionEventPayPurchaseAmount7dRoi},
+            #{add.placementType},
+            #{add.adScene},
+            #{add.eventOrderSuccessed},
+            #{add.adPhotoPlayed10sRatio},
+            #{add.keyActionCost},
+            #{add.eventAddShoppingCartCost},
+            #{add.eventAdWatchTimesRatio},
+            #{add.eventOutboundCallCost},
+            #{add.eventOutboundCall},
+            #{add.actionNewRatio},
+            #{add.eventWatchAppAd},
+            #{add.eventMultiConversionCost},
+            #{add.eventPhoneCardActivate},
+            #{add.adPhotoPlayed75percentRatio},
+            #{add.keyActionRatio},
+            #{add.eventAdWatchTimesCost},
+            #{add.eventAddShoppingCart},
+            #{add.keyAction},
+            #{add.eventMultiConversion},
+            #{add.eventWechatConnected},
+            #{add.eventDspGiftForm},
+            #{add.eventIntentionConfirmed},
+            #{add.eventPhoneGetThrough},
+            #{add.eventMultiConversionRatio},
+            #{add.eventMeasurementHouse},
+            #{add.adPhotoPlayed2sRatio},
+            #{add.eventOutboundCallRatio},
+            #{add.eventAdWatchTimes}
+
+            )
+        </foreach>
+    </insert>
+</mapper>

+ 3 - 0
job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/data/service/IAdUnitReportService.java

@@ -4,6 +4,7 @@ import cn.com.ctop.job.kuaishou.data.entity.KuaishouAdUnitList;
 import cn.com.ctop.job.kuaishou.data.entity.OauthToken;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
 import java.util.PrimitiveIterator;
 
 /**
@@ -20,4 +21,6 @@ public interface IAdUnitReportService{
 
     public void getAgentReport();
 
+    public void getKuaishouAccountAdSceneDaily(Long advertiserId, String accessToken, String startDate, String endDate, int page, String temporalGranularity, List<String> reportDims);
+
 }

+ 64 - 0
job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/data/service/impl/AdUnitReportServiceImpl.java

@@ -3,6 +3,7 @@ package cn.com.ctop.job.kuaishou.data.service.impl;
 import cn.com.ctop.job.kuaishou.data.constant.KuaishouConstant;
 import cn.com.ctop.job.kuaishou.data.entity.*;
 import cn.com.ctop.job.kuaishou.data.mapper.AdUnitReportMapper;
+import cn.com.ctop.job.kuaishou.data.mapper.KuaishouAccountAdSceneReportDailyMapper;
 import cn.com.ctop.job.kuaishou.data.mapper.OauthAgentTokenMapper;
 import cn.com.ctop.job.kuaishou.data.mapper.OauthTokenMapper;
 import cn.com.ctop.job.kuaishou.data.service.IAdUnitReportService;
@@ -48,6 +49,9 @@ public class AdUnitReportServiceImpl implements IAdUnitReportService {
     @Resource
     private AdUnitReportMapper adUnitReportMapper;
 
+    @Resource
+    private KuaishouAccountAdSceneReportDailyMapper accountAdSceneReportDailyMapper;
+
 
   /**
    * 获取广告组信息
@@ -197,6 +201,8 @@ public class AdUnitReportServiceImpl implements IAdUnitReportService {
     }
   }
 
+
+
   /**
    * 获取代理商数据
    * @param token
@@ -259,5 +265,63 @@ public class AdUnitReportServiceImpl implements IAdUnitReportService {
   }
 
 
+  /**
+   *
+   * @description: 广告主数据
+   *
+   * @param advertiserId
+   * @param accessToken
+   * @param startDate
+   * @param endDate
+   * @param page
+   * @param temporalGranularity 天粒度(DAILY)/小时粒度(HOURLY),默认支持天粒度数据
+   * @param reportDims "adScene":按广告场景;"placementType":按广告范围,快手/联盟;不传/传空/传空数组:不限
+   * @return: void
+   * @author: zianY
+   * @time: 2022/1/6
+   */
+  @Override
+    public void getKuaishouAccountAdSceneDaily(Long advertiserId, String accessToken, String startDate, String endDate, int page,String temporalGranularity,List<String> reportDims) {
+      log.info("获取账户日报====广告场景====,账户id:{},开始时间:{},结束时间:{},page--{}", advertiserId, startDate, endDate,page);
+      String url = postUrl + KuaishouConstant.ACCOUNT_REPORT;
+      Map<String, String> headers = new HashMap<>();
+      headers.put("Access-Token", accessToken);
+      Map<String, Object> param = new HashMap<>();
+      param.put("start_date", startDate);
+      param.put("end_date", endDate);
+      param.put("advertiser_id", advertiserId);
+      param.put("temporal_granularity", temporalGranularity);
+      param.put("report_dims", reportDims);
+      param.put("page_size", 2000);
+      param.put("page", page);
+      String result = HttpUtils.httpPostRequest(url, param, headers);
+      JSONObject resultJson = JSONObject.parseObject(result);
+      Integer code = resultJson.getInteger("code");
+      String message = resultJson.getString("message");
+      if (null == code || code != 0) {
+        log.error("获取快手广告主日报===按广告场景=====异常:{},accountId:{}", message, advertiserId);
+        return;
+      }
+      JSONArray details = resultJson.getJSONObject("data").getJSONArray("details");
+      if (null == details || details.size() <= 0) {
+        log.error("快手日报===按广告场景=====返回详情为空,accountId:{}", advertiserId);
+        return;
+      }
+      List<KuaishouAccountAdSceneReportDaily> addList = new ArrayList<>();
+      for (int i = 0; i < details.size(); i++) {
+        JSONObject returnJson = details.getJSONObject(i);
+        returnJson.put("advertiser_id",advertiserId);
+        KuaishouAccountAdSceneReportDaily reportDaily = KuaishouAccountAdSceneReportDaily.getKuaishouAccountAdsecneInfo(returnJson);
+        addList.add(reportDaily);
+      }
+      if (!Check.isNull(addList)) {
+        accountAdSceneReportDailyMapper.replaceBatchKsAccountAdScene(addList);
+      }
+      getKuaishouAccountAdSceneDaily(advertiserId, accessToken, startDate, endDate, page + 1,temporalGranularity,reportDims);
+      log.info("账户日报数据====广告场景=====获取完成:accountId:{}", advertiserId);
+    }
+
+
+
 
   }

+ 41 - 0
job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/AdUnitReportJob.java

@@ -12,6 +12,9 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
@@ -115,4 +118,42 @@ public class AdUnitReportJob {
   }
 
 
+
+
+
+  /**
+   * 快手-账户日报-adScene(按广告场景)
+   * DAILY 天
+   * @throws Exception
+   */
+  @XxlJob("KuaishouAccountAdSceneDailyReportJob")
+  public void KuaishouAccountAdSceneDailyReportJob() throws Exception {
+    String param = XxlJobHelper.getJobParam(); // 执行参数
+    if (Check.isNull(param)) {
+      log.error("入参为空");
+      return;
+    }
+    String token = tokenService.getByAccountId(Long.valueOf(param));
+    if (Check.isNull(token)) {
+      log.error("此账户未获取到相关token,accountId:{}", param);
+      return;
+    }
+
+    String date = DateUtils.getAnotherDay("yyyy-MM-dd", DateUtils.getNowDate("yyyy-MM-dd"), -1);
+    //广告场景
+    List<String> reportDims = Arrays.asList("adScene");
+    dailyExecutorService.submit(
+            new Runnable() {
+              @Override
+              public void run() {
+                adUnitReportService.getKuaishouAccountAdSceneDaily(Long.valueOf(param), token, date, date, 1,"DAILY",reportDims);
+              }
+            });
+  }
+
+
+
+
+
+
 }