- common.annotation -> framework.annotation(DataPermission/Log/RateLimit/RepeatSubmit/ValidField) - common.base.BaseEntity -> framework.base.BaseEntity(含 createTime/updateTime 自动填充注解) - BaseQuery/IBaseEnum 保留在 common.base(无框架依赖) - AutoFillMetaObjectHandler 实现 createTime/updateTime/createBy/updateBy 自动填充 - 实体类(Dept/Role/Config/DictItem/Notice/SysUser)添加 createBy/updateBy @TableField(fill=...) - Jackson 注解使用 com.fasterxml.jackson.annotation(2.x 兼容层),databind/core 使用 tools.jackson(3.x) - 代码生成模板 entity.java.vm/form.java.vm 包路径同步更新 - 删除冗余 UserService default 方法、DataPermissionException、DictChangeEvent event 包 - 版本号 4.4.0 -> 4.5.0
40 lines
1.1 KiB
Java
40 lines
1.1 KiB
Java
package com.youlai.boot.common.base;
|
||
|
||
import com.youlai.boot.framework.annotation.ValidField;
|
||
import io.swagger.v3.oas.annotations.media.Schema;
|
||
import lombok.Data;
|
||
|
||
import java.io.Serial;
|
||
import java.io.Serializable;
|
||
|
||
/**
|
||
* 查询参数基类
|
||
*
|
||
* @author Ray.Hao
|
||
* @since 0.0.1
|
||
*/
|
||
@Data
|
||
@Schema
|
||
public class BaseQuery implements Serializable {
|
||
|
||
@Serial
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
@Schema(description = "页码", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "1")
|
||
private Integer pageNum = 1;
|
||
|
||
@Schema(description = "每页记录数", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "10")
|
||
private Integer pageSize = 10;
|
||
|
||
@Schema(description = "排序字段", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@ValidField(allowedValues = {"create_time", "update_time"})
|
||
private String sortBy;
|
||
|
||
@Schema(description = "排序方式(正序:ASC;反序:DESC)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
private String order;
|
||
|
||
public boolean isPaged() {
|
||
return pageNum != null && pageSize != null && pageSize > 0;
|
||
}
|
||
}
|