diff --git a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductVideoVO.java b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductVideoVO.java index efc525cc..0af8f34e 100644 --- a/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductVideoVO.java +++ b/nflg-mobilebroken-common/src/main/java/com/nflg/mobilebroken/common/pojo/vo/ProductVideoVO.java @@ -1,18 +1,28 @@ package com.nflg.mobilebroken.common.pojo.vo; +import cn.hutool.core.util.StrUtil; import lombok.Data; import javax.validation.constraints.NotNull; @Data -public class ProductVideoVO extends ProductImageVO{ +public class ProductVideoVO extends ProductImageVO { /** * 类型,0-视频;1:图片 */ - @NotNull private Integer type; + public Integer getType() { + if (StrUtil.isNotBlank(video)) { + return 0; + } + if (StrUtil.isNotBlank(getImage())) { + return 1; + } + return null; + } + /** * 视频地址 */