|
|
@@ -0,0 +1,217 @@
|
|
|
+package cn.com.ctop.job.kuaishou.data.entity;
|
|
|
+
|
|
|
+import cn.com.ctop.job.kuaishou.data.utils.Check;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.annotation.IdType;
|
|
|
+import com.baomidou.mybatisplus.annotation.TableId;
|
|
|
+import com.baomidou.mybatisplus.annotation.TableName;
|
|
|
+import com.fasterxml.jackson.annotation.JsonFormat;
|
|
|
+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 org.springframework.format.annotation.DateTimeFormat;
|
|
|
+
|
|
|
+import java.util.Date;
|
|
|
+/**
|
|
|
+ * 代理商报表
|
|
|
+ *
|
|
|
+ * @author zian Y
|
|
|
+ * @version V1.0
|
|
|
+ * @date 2022-01-06
|
|
|
+ */
|
|
|
+@Data
|
|
|
+@TableName("kuaishou_agent_report_daily")
|
|
|
+@EqualsAndHashCode(callSuper = false)
|
|
|
+@Accessors(chain = true)
|
|
|
+@ApiModel(value = "kuaishou_agent_report_daily对象", description = "代理商报表")
|
|
|
+public class KuaiShouDailyAgent {
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 代理商id
|
|
|
+ */
|
|
|
+ @Excel(name = "代理商id", width = 15)
|
|
|
+ @ApiModelProperty(value = "代理商id")
|
|
|
+ private Long agentId;
|
|
|
+ /**
|
|
|
+ * 账户ID
|
|
|
+ */
|
|
|
+ @Excel(name = "账户ID", width = 15)
|
|
|
+ @ApiModelProperty(value = "账户ID")
|
|
|
+ private Long advertiserId;
|
|
|
+ /**
|
|
|
+ * 日期
|
|
|
+ */
|
|
|
+ @Excel(name = "日期", width = 15)
|
|
|
+ @ApiModelProperty(value = "日期")
|
|
|
+ private String statDate;
|
|
|
+ /**
|
|
|
+ * user_id
|
|
|
+ */
|
|
|
+ @Excel(name = "user_id", width = 15)
|
|
|
+ @ApiModelProperty(value = "user_id")
|
|
|
+ private Long userId;
|
|
|
+ /**
|
|
|
+ * 广告主名称
|
|
|
+ */
|
|
|
+ @Excel(name = "广告主名称", width = 15)
|
|
|
+ @ApiModelProperty(value = "广告主名称")
|
|
|
+ private String accountName;
|
|
|
+ /**
|
|
|
+ * 总消耗(元)
|
|
|
+ */
|
|
|
+ @Excel(name = "总消耗(元)", width = 15)
|
|
|
+ @ApiModelProperty(value = "总消耗(元)")
|
|
|
+ private java.math.BigDecimal totalChargedInYuan;
|
|
|
+ /**
|
|
|
+ * 总余额(元)
|
|
|
+ */
|
|
|
+ @Excel(name = "总余额(元)", width = 15)
|
|
|
+ @ApiModelProperty(value = "总余额(元)")
|
|
|
+ private java.math.BigDecimal totalBalanceInYuan;
|
|
|
+ /**
|
|
|
+ * 现金消耗(元)
|
|
|
+ */
|
|
|
+ @Excel(name = "现金消耗(元)", width = 15)
|
|
|
+ @ApiModelProperty(value = "现金消耗(元)")
|
|
|
+ private java.math.BigDecimal realChargedInYuan;
|
|
|
+ /**
|
|
|
+ * 返点消耗(元)
|
|
|
+ */
|
|
|
+ @Excel(name = "返点消耗(元)", width = 15)
|
|
|
+ @ApiModelProperty(value = "返点消耗(元)")
|
|
|
+ private java.math.BigDecimal totalRebateRealChargedInYuan;
|
|
|
+ /**
|
|
|
+ * 框返消耗(元)
|
|
|
+ */
|
|
|
+ @Excel(name = "框返消耗(元)", width = 15)
|
|
|
+ @ApiModelProperty(value = "框返消耗(元)")
|
|
|
+ private java.math.BigDecimal contractRebateRealChargedInYuan;
|
|
|
+ /**
|
|
|
+ * 激励消耗(元)
|
|
|
+ */
|
|
|
+ @Excel(name = "激励消耗(元)", width = 15)
|
|
|
+ @ApiModelProperty(value = "激励消耗(元)")
|
|
|
+ private java.math.BigDecimal directRebateRealChargedInYuan;
|
|
|
+ /**
|
|
|
+ * 信用消耗(元)
|
|
|
+ */
|
|
|
+ @Excel(name = "信用消耗(元)", width = 15)
|
|
|
+ @ApiModelProperty(value = "信用消耗(元)")
|
|
|
+ private java.math.BigDecimal creditRealChargedInYuan;
|
|
|
+ /**
|
|
|
+ * 消耗环比
|
|
|
+ */
|
|
|
+ @Excel(name = "消耗环比", width = 15)
|
|
|
+ @ApiModelProperty(value = "消耗环比")
|
|
|
+ private String chargeDayOnDayPercent;
|
|
|
+ /**
|
|
|
+ * 封面曝光数
|
|
|
+ */
|
|
|
+ @Excel(name = "封面曝光数", width = 15)
|
|
|
+ @ApiModelProperty(value = "封面曝光数")
|
|
|
+ private Long adPhotoImpression;
|
|
|
+ /**
|
|
|
+ * 封面点击数
|
|
|
+ */
|
|
|
+ @Excel(name = "封面点击数", width = 15)
|
|
|
+ @ApiModelProperty(value = "封面点击数")
|
|
|
+ private Long adPhotoClick;
|
|
|
+ /**
|
|
|
+ * 素材曝光数
|
|
|
+ */
|
|
|
+ @Excel(name = "素材曝光数", width = 15)
|
|
|
+ @ApiModelProperty(value = "素材曝光数")
|
|
|
+ private Long adItemImpression;
|
|
|
+ /**
|
|
|
+ * 行为数
|
|
|
+ */
|
|
|
+ @Excel(name = "行为数", width = 15)
|
|
|
+ @ApiModelProperty(value = "行为数")
|
|
|
+ private Long adItemClick;
|
|
|
+ /**
|
|
|
+ * 封面点击率
|
|
|
+ */
|
|
|
+ @Excel(name = "封面点击率", width = 15)
|
|
|
+ @ApiModelProperty(value = "封面点击率")
|
|
|
+ private String photoClickRatio;
|
|
|
+ /**
|
|
|
+ * 行为点击率
|
|
|
+ */
|
|
|
+ @Excel(name = "行为点击率", width = 15)
|
|
|
+ @ApiModelProperty(value = "行为点击率")
|
|
|
+ private String itemClickRatio;
|
|
|
+ /**
|
|
|
+ * 有消费计划数
|
|
|
+ */
|
|
|
+ @Excel(name = "有消费计划数", width = 15)
|
|
|
+ @ApiModelProperty(value = "有消费计划数")
|
|
|
+ private Long chargedCampaignCount;
|
|
|
+ /**
|
|
|
+ * 产品名
|
|
|
+ */
|
|
|
+ @Excel(name = "产品名", width = 15)
|
|
|
+ @ApiModelProperty(value = "产品名")
|
|
|
+ private String productName;
|
|
|
+ /**
|
|
|
+ * 企业名称
|
|
|
+ */
|
|
|
+ @Excel(name = "企业名称", width = 15)
|
|
|
+ @ApiModelProperty(value = "企业名称")
|
|
|
+ private String corporationName;
|
|
|
+ /**
|
|
|
+ * 首次消耗日期
|
|
|
+ */
|
|
|
+ @Excel(name = "首次消耗日期", width = 15)
|
|
|
+ @ApiModelProperty(value = "首次消耗日期")
|
|
|
+ private String firstCostDay;
|
|
|
+ /**
|
|
|
+ * 一级行业
|
|
|
+ */
|
|
|
+ @Excel(name = "一级行业", width = 15)
|
|
|
+ @ApiModelProperty(value = "一级行业")
|
|
|
+ private String industry;
|
|
|
+ /**
|
|
|
+ * 二级行业
|
|
|
+ */
|
|
|
+ @Excel(name = "二级行业", width = 15)
|
|
|
+ @ApiModelProperty(value = "二级行业")
|
|
|
+ private String secondIndustry;
|
|
|
+
|
|
|
+
|
|
|
+ public static KuaiShouDailyAgent getKuaishouAgentDailyInfo(JSONObject detailJson){
|
|
|
+ KuaiShouDailyAgent agent = new KuaiShouDailyAgent();
|
|
|
+ agent.setAgentId(detailJson.getLong("agent_id"));
|
|
|
+ agent.setAdvertiserId(detailJson.getLong("account_id"));
|
|
|
+ agent.setStatDate(detailJson.getString("date_time").replace("-",""));
|
|
|
+ agent.setUserId(detailJson.getLong("user_id"));
|
|
|
+ agent.setAccountName(detailJson.getString("account_name"));
|
|
|
+ agent.setTotalChargedInYuan(detailJson.getBigDecimal("total_charged_in_yuan"));
|
|
|
+ agent.setTotalBalanceInYuan(detailJson.getBigDecimal("total_balance_in_yuan"));
|
|
|
+ agent.setRealChargedInYuan(detailJson.getBigDecimal("real_charged_in_yuan"));
|
|
|
+ agent.setTotalRebateRealChargedInYuan(detailJson.getBigDecimal("total_rebate_real_charged_in_yuan"));
|
|
|
+ agent.setContractRebateRealChargedInYuan(detailJson.getBigDecimal("contract_rebate_real_charged_in_yuan"));
|
|
|
+ agent.setDirectRebateRealChargedInYuan(detailJson.getBigDecimal("direct_rebate_real_charged_in_yuan"));
|
|
|
+ agent.setCreditRealChargedInYuan(detailJson.getBigDecimal("credit_real_charged_in_yuan"));
|
|
|
+ agent.setChargeDayOnDayPercent(detailJson.getString("charge_day_on_day_percent"));
|
|
|
+ agent.setAdPhotoImpression(detailJson.getLong("ad_photo_impression"));
|
|
|
+ agent.setAdPhotoClick(detailJson.getLong("ad_photo_click"));
|
|
|
+ agent.setAdItemImpression(detailJson.getLong("ad_item_impression"));
|
|
|
+ agent.setAdItemClick(detailJson.getLong("ad_item_click"));
|
|
|
+ agent.setPhotoClickRatio(detailJson.getString("photo_click_ratio"));
|
|
|
+ agent.setItemClickRatio(detailJson.getString("item_click_ratio"));
|
|
|
+ agent.setChargedCampaignCount(detailJson.getLong("charged_campaign_count"));
|
|
|
+ agent.setProductName(detailJson.getString("product_name"));
|
|
|
+ agent.setCorporationName(detailJson.getString("corporation_name"));
|
|
|
+ agent.setFirstCostDay(Check.isNull(detailJson.getString("first_cost_day").replace("-","")) ? "0" : detailJson.getString("first_cost_day").replace("-",""));
|
|
|
+ agent.setIndustry(detailJson.getString("industry"));
|
|
|
+ agent.setSecondIndustry(detailJson.getString("second_industry"));
|
|
|
+ return agent;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+}
|