mirror of
https://github.com/zongzibinbin/MallChat.git
synced 2026-03-13 21:53:41 +08:00
fix: 增加pageSize的Min校验,修复pageSize小于0不分页的问题
This commit is contained in:
@@ -10,6 +10,7 @@ import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
|
||||
/**
|
||||
* @author <a href="https://github.com/zongzibinbin">abin</a>
|
||||
@@ -22,6 +23,7 @@ import javax.validation.constraints.Max;
|
||||
public class CursorPageBaseReq {
|
||||
|
||||
@ApiModelProperty("页面大小")
|
||||
@Min(0)
|
||||
@Max(50)
|
||||
private Integer pageSize = 10;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
|
||||
/**
|
||||
* @author <a href="https://github.com/zongzibinbin">abin</a>
|
||||
@@ -16,6 +17,7 @@ import javax.validation.constraints.Max;
|
||||
public class PageBaseReq {
|
||||
|
||||
@ApiModelProperty("页面大小")
|
||||
@Min(0)
|
||||
@Max(50)
|
||||
private Integer pageSize = 10;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user