package com.dy.common.webUtil; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import lombok.*; @Data @ToString @NoArgsConstructor @AllArgsConstructor @Schema(name = "查询条件基类") public class QueryConditionVo { /** * 当前查询页 */ @Schema(description = "当前页", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "当前页不能为空") //不能为空也不能为null public Integer pageCurr; /** * 每页数据条数 */ @Schema(description = "每页记录数", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "每页记录数不能为空") //不能为空也不能为null public Integer pageSize; /** * 设置当前默认第一页 * @return */ public Integer getPageCurr() { if (pageCurr == null){ return 1; } return pageCurr; } /** * 设置当前默认一页十条 * @return */ public Integer getPageSize() { if (pageSize == null){ return 10; } return pageSize; } }