|
@@ -9,9 +9,10 @@ import lombok.Data;
|
|
|
import lombok.experimental.Accessors;
|
|
|
|
|
|
/**
|
|
|
- * @Description:
|
|
|
- * @Author:sumbytes
|
|
|
- * @Date:2018/09/21 13:30
|
|
|
+ * VO 层基础父类.
|
|
|
+ *
|
|
|
+ * @param <T> VO类型
|
|
|
+ * @author Young
|
|
|
*/
|
|
|
@Data
|
|
|
@Accessors(chain = true)
|
|
@@ -20,7 +21,7 @@ public class BaseVO<T> {
|
|
|
/**
|
|
|
* 主键
|
|
|
*/
|
|
|
- @NotNull(message = Messages.ID_NOT_NULL,groups = {Update.class})
|
|
|
+ @NotNull(message = Messages.ID_NOT_NULL, groups = {Update.class})
|
|
|
protected Long id;
|
|
|
|
|
|
/**
|
|
@@ -31,13 +32,13 @@ public class BaseVO<T> {
|
|
|
/**
|
|
|
* 页数
|
|
|
*/
|
|
|
- @IntegerNotNull(groups = {Page.class},message = Messages.PAGE_NOT_NULL)
|
|
|
+ @IntegerNotNull(groups = {Page.class}, message = Messages.PAGE_NOT_NULL)
|
|
|
protected Integer page;
|
|
|
|
|
|
/**
|
|
|
* 每页大小
|
|
|
*/
|
|
|
- @IntegerNotNull(groups = {Page.class},message = Messages.SIZE_NOT_NULL)
|
|
|
+ @IntegerNotNull(groups = {Page.class}, message = Messages.SIZE_NOT_NULL)
|
|
|
protected Integer size;
|
|
|
|
|
|
public Long getId() {
|
|
@@ -53,9 +54,10 @@ public class BaseVO<T> {
|
|
|
return size;
|
|
|
}
|
|
|
|
|
|
- public BaseVO<T> setSize(Integer size) {
|
|
|
+
|
|
|
+ public T setSize(Integer size) {
|
|
|
this.size = size > 20 ? 20 : size;
|
|
|
- return this;
|
|
|
+ return (T) this;
|
|
|
}
|
|
|
|
|
|
}
|