All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dahuatech.icc.multiinone.oss.vo.ShowPicRequest Maven / Gradle / Ivy

There is a newer version: 1.0.13.7
Show newest version
package com.dahuatech.icc.multiinone.oss.vo;

import com.dahuatech.icc.common.ParamValidEnum;
import com.dahuatech.icc.multiinone.exception.BusinessException;
import com.dahuatech.icc.multiinone.oss.enums.PictureSplicingFormatEnums;
import com.dahuatech.icc.multiinone.utils.StringUtils;
import com.dahuatech.icc.multiinone.vo.BaseRequest;

public class ShowPicRequest extends BaseRequest {
    private String picUri;

    private Integer type;

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public void businessValid() {
        if(StringUtils.isEmpty(picUri)){
            throw new BusinessException("图片地址为空");
        }
        if(!PictureSplicingFormatEnums.isRight(type)){
            throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(),"图片拼接格式非法");
        }
    }

    public String getPicUri() {
        return picUri;
    }

    public void setPicUri(String picUri) {
        this.picUri = picUri;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy