TraceBean.java 2.32 KB
package com.wd.foundation.bean.analytics;

import com.wd.foundation.bean.base.BaseBean;
import com.wd.foundation.bean.custom.content.ContentTypeConstant;

/**
 * 埋点-推荐数据bean
 *
 * @author baozhaoxin
 * @version [V1.0.0, 2023/3/14]
 * @since V1.0.0
 */
public class TraceBean extends BaseBean {


    /**
     * 来源频道
     */
    public String channelSourceId;

    /**
     * 组件样式
     */
    public String componentType;

    /**
     * 场景ID
     */
    public String sceneId;

    /**
     * 子场景ID
     */
    public String subSceneId;

    /**
     * 行为类型
     */
    public String action;


    /**
     * 卡片物料id
     */
    public String cardItemId;

    /**
     * 行为针对的物料ID
     */
    public String itemId;

    /**
     * 物料的溯源Id
     */
    public String traceId;

    /**
     * 当前交互触点(或页面)
     */
    public String saPosition;

    /**
     * 分享渠道
     */
    public String shareChannel;

    /**
     * 浏览时长
     */
    public long duration;

    /**
     * 实验ID
     */
    public String expIds;

    /**
     * contentType转ItemType
     */
    public String toItemType(int type) {

        String itemType = "";

        if (ContentTypeConstant.URL_TYPE_ZERO == type) {
            // 不跳转
        } else if (ContentTypeConstant.URL_TYPE_ONE == type) {
            // 点播
            itemType = ItemTypeConstant.ITEM_TYPE_VIDEO;
        } else if (ContentTypeConstant.URL_TYPE_TWO == type) {
            //  直播
        } else if (ContentTypeConstant.URL_TYPE_FIVE == type) {
            // 5专题
        } else if (ContentTypeConstant.URL_TYPE_SIX == type) {
            // 6,跳转H5外链
            itemType = ItemTypeConstant.ITEM_TYPE_ITEM;
        } else if (ContentTypeConstant.URL_TYPE_EIGHT == type) {
            // 8 图文
            itemType = ItemTypeConstant.ITEM_TYPE_ARTICLE;
        } else if (ContentTypeConstant.URL_TYPE_NINE == type) {
            // 9 组图 图集
            itemType = ItemTypeConstant.ITEM_TYPE_IMAGE;
        } else if (ContentTypeConstant.URL_TYPE_TEN == type) {
            // 10 H5新闻
            itemType = ItemTypeConstant.ITEM_TYPE_ITEM;
        } else if (ContentTypeConstant.URL_TYPE_ELEVEN == type) {
            // 11 频道
        }

        return itemType;
    }
}