🔨 添加排序字段.

This commit is contained in:
lijiahangmax
2025-03-19 23:24:08 +08:00
parent 9752dfa680
commit 94c0b6a785
61 changed files with 338 additions and 324 deletions

View File

@@ -31,15 +31,15 @@ import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
/**
* 公共页码请求
* 基本查询请求
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/7/12 23:14
*/
@Data
@Schema(name = "PageRequest", description = "公共页码请求")
public class PageRequest {
@Schema(name = "BaseQueryRequest", description = "基本查询请求")
public class BaseQueryRequest implements IPageRequest, IOrderRequest {
@NotNull(groups = Page.class)
@Min(value = 1, groups = Page.class)
@@ -53,4 +53,7 @@ public class PageRequest {
@Schema(description = "大小")
private Integer limit;
@Schema(description = "查询排序")
private Integer order;
}

View File

@@ -0,0 +1,19 @@
package org.dromara.visor.common.entity;
/**
* 查询排序请求
*
* @author Jiahang Li
* @version 1.0.0
* @since 2025/3/17 22:04
*/
public interface IOrderRequest {
/**
* 查询排序
*
* @return sort 0DESC 1ASC 其他不排序
*/
Integer getOrder();
}

View File

@@ -0,0 +1,26 @@
package org.dromara.visor.common.entity;
/**
* 页码请求
*
* @author Jiahang Li
* @version 1.0.0
* @since 2025/3/17 22:02
*/
public interface IPageRequest {
/**
* 页码
*
* @return page
*/
Integer getPage();
/**
* 大小
*
* @return limit
*/
Integer getLimit();
}