PublishCoverBean.java 1.4 KB
package com.wd.foundation.bean.publish;

import android.text.TextUtils;
import java.io.Serializable;
import java.util.List;

/**
 * 发布-封面bean
 * @author baozhaoxin
 * @version [V1.0.0, 2023/7/10]
 * @since V1.0.0
 */
public class PublishCoverBean implements Serializable {
    /**
     * 封面类型
     * 0:无图,1:单图,2:大图,3:三图
     */
    private int coverType;

    /**
     * 三图封面路径
     */
    private List<AtlasPictureBean> coverPathList;


    public int getCoverType() {
        return coverType;
    }

    public void setCoverType(int coverType) {
        this.coverType = coverType;
    }

    public List<AtlasPictureBean> getCoverPathList() {
        return coverPathList;
    }

    public void setCoverPathList(List<AtlasPictureBean> coverPathList) {
        this.coverPathList = coverPathList;
    }

    public String getOneCoverPath(){
        String coverImg = getThreeListFirstImage();
        return coverImg;
    }

    private String getThreeListFirstImage(){
        String coverImage = "";
        if (null != coverPathList && 0 != coverPathList.size()){
            for (AtlasPictureBean imageBean : coverPathList){
                if (imageBean!= null && !TextUtils.isEmpty(imageBean.getPicPath())){
                    coverImage = imageBean.getPicPath();
                    break;
                }
            }
        }
        return coverImage;
    }
}