Selaa lähdekoodia

完善长度校验规则。

bruce 2 vuotta sitten
vanhempi
commit
b0ac6d9a88

+ 1 - 1
imcs-bt-be/imcs-business-entity/src/main/java/com/github/zuihou/business/goods/dto/GoodsSaveDTO.java

@@ -7,7 +7,6 @@ import lombok.experimental.Accessors;
 import org.hibernate.validator.constraints.Length;
 
 import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
 import java.io.Serializable;
 import java.math.BigDecimal;
 
@@ -79,5 +78,6 @@ public class GoodsSaveDTO implements Serializable
      * 简介
      */
     @ApiModelProperty(value = "简介")
+    @Length(max = 200, message = "简介不能超过200长度")
     private Long introduction;
 }

+ 1 - 0
imcs-bt-be/imcs-business-entity/src/main/java/com/github/zuihou/business/goods/dto/GoodsUpdateDTO.java

@@ -76,5 +76,6 @@ public class GoodsUpdateDTO implements Serializable
      * 简介
      */
     @ApiModelProperty(value = "简介")
+    @Length(max = 200, message = "简介不能超过200长度")
     private Long introduction;
 }

+ 1 - 0
imcs-bt-be/imcs-business-entity/src/main/java/com/github/zuihou/business/goods/entity/Goods.java

@@ -188,5 +188,6 @@ public class Goods extends Entity<Long>
      * 简介
      */
     @ApiModelProperty(value = "简介")
+    @Length(max = 200, message = "简介不能超过200长度")
     private String introduction;
 }