package com.macro.mall.dto;

import com.macro.mall.validator.FlagValidator;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
 * 添加更新产品分类的参数
 * Created by macro on 2018/4/26.
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class PmsProductCategoryParam {
    @ApiModelProperty("父分类的编号")
    private Long parentId;
    @ApiModelProperty(value = "商品分类名称",required = true)
    @NotEmpty(message = "商品分类名称不能为空")
    private String name;
    @ApiModelProperty("分类单位")
    private String productUnit;
    @ApiModelProperty("是否在导航栏显示")
    @FlagValidator(value = {"0","1"},message = "状态只能为0或1")
    private Integer navStatus;
    @ApiModelProperty("是否进行显示")
    @FlagValidator(value = {"0","1"},message = "状态只能为0或1")
    private Integer showStatus;
    @ApiModelProperty("排序")
    @Min(value = 0,message = "排序最小为0")
    private Integer sort;
    @ApiModelProperty("图标")
    private String icon;
    @ApiModelProperty("关键字")
    private String keywords;
    @ApiModelProperty("描述")
    private String description;
    @ApiModelProperty("产品相关筛选属性集合")
    private List<Long> productAttributeIdList;
}

@@ -481,16 +481,30 @@
 rentId;%0A
+    @NotEmpty%0A
     @Api
@@ -555,46 +555,8 @@
 ue)%0A
-    @NotEmpty(message = %22%E5%95%86%E5%93%81%E5%88%86%E7%B1%BB%E5%90%8D%E7%A7%B0%E4%B8%8D%E8%83%BD%E4%B8%BA%E7%A9%BA%22)%0A
     
@@ -642,42 +642,8 @@
 it;%0A
-    @ApiModelProperty(%22%E6%98%AF%E5%90%A6%E5%9C%A8%E5%AF%BC%E8%88%AA%E6%A0%8F%E6%98%BE%E7%A4%BA%22)%0A
     
@@ -705,66 +705,68 @@
     
-private Integer navStatus;%0A    @ApiModelProperty(%22%E6%98%AF%E5%90%A6%E8%BF%9B%E8%A1%8C%E6%98%BE%E7%A4%BA%22)
+@ApiModelProperty(%22%E6%98%AF%E5%90%A6%E5%9C%A8%E5%AF%BC%E8%88%AA%E6%A0%8F%E6%98%BE%E7%A4%BA%22)%0A    private Integer navStatus;
 %0A   
@@ -817,24 +817,56 @@
 %22%E7%8A%B6%E6%80%81%E5%8F%AA%E8%83%BD%E4%B8%BA0%E6%88%961%22)%0A
+    @ApiModelProperty(%22%E6%98%AF%E5%90%A6%E8%BF%9B%E8%A1%8C%E6%98%BE%E7%A4%BA%22)%0A
     private 
@@ -881,24 +881,44 @@
 showStatus;%0A
+    @Min(value = 0)%0A
     @ApiMode
@@ -937,47 +937,8 @@
 %E5%BA%8F%22)%0A
-    @Min(value = 0,message = %22%E6%8E%92%E5%BA%8F%E6%9C%80%E5%B0%8F%E4%B8%BA0%22)%0A
     

Update PmsProductCategoryParam.java