com.dahuatech.icc.multiinone.oss.vo.DownloadPicRequest Maven / Gradle / Ivy
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 DownloadPicRequest extends BaseRequest {
private String picUri;
private Integer type;
public void businessValid() throws BusinessException{
if(StringUtils.isEmpty(picUri)){
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(),"图片地址为空");
}
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;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
}