Commit 43cccd29 by 丁伟峰

采用Config静态常量

1 parent 33b71214
package com.dituhui.pea.order.config;
import org.springframework.context.annotation.Configuration;
@Configuration
public class OrderConfig {
public static final int DEFAULT_PAGE_SIZE = 10;
public static final int DEFAULT_PAGE_INDEX = 1;
}
package com.dituhui.pea.order.dto;
import com.dituhui.pea.order.config.OrderConfig;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
......@@ -21,6 +23,6 @@ public class CapacityStatQueryReqDTO {
*/
@NotBlank
private String levelValue;
private Integer page;
private Integer size;
private Integer page = OrderConfig.DEFAULT_PAGE_INDEX;
private Integer size = OrderConfig.DEFAULT_PAGE_SIZE;
}
package com.dituhui.pea.order.dto;
import com.dituhui.pea.order.config.OrderConfig;
import java.util.List;
@lombok.Data
......@@ -8,8 +10,8 @@ public class EngineersGanttReqDTO {
private String levelType;
private String levelValue;
private Integer page;
private Integer size;
private Integer page = OrderConfig.DEFAULT_PAGE_INDEX;
private Integer size = OrderConfig.DEFAULT_PAGE_SIZE;
private String date;
private List<String> engineerCodes;
}
package com.dituhui.pea.order.dto;
import com.dituhui.pea.order.config.OrderConfig;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
......@@ -14,8 +15,8 @@ public class OrderChangeListReqDTO {
* levelType对应的id值
*/
private String levelValue;
private int page;
private int size;
private int page = OrderConfig.DEFAULT_PAGE_INDEX;
private int size = OrderConfig.DEFAULT_PAGE_SIZE;
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date date = new Date();
/**
......
......@@ -2,6 +2,8 @@ package com.dituhui.pea.order.dto;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
......@@ -13,7 +15,9 @@ public class OrderCreateReqDTO {
private String phone;
private String address;
private LocationDTO location;
@NotBlank
private String brand;
@NotBlank()
private String type;
private String skill;
private String faultDescribe;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!