TraceBean.java 1.87 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 {

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

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

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

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

    /**
     * 内容ID
     */
    public String itemId;

    /**
     * contentType转ItemType
     *
     * @param type
     * @return
     */
    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;
    }
}