package com.sinata.rest.modular.mall.controller.body;
|
|
import io.swagger.annotations.ApiModelProperty;
|
import lombok.Data;
|
|
/**
|
* <p>
|
* 分页基础参数类
|
* </p>
|
*
|
* @ClassName com.sinata.rest.modular.mall.controller.body.BaseBodyPage
|
* @Description 分页基础参数类
|
* @Author BaiHua
|
* @Date 2023/3/21 21:47
|
*/
|
@Data
|
public class BaseBodyLimitPage {
|
|
@ApiModelProperty(value = "当前页数")
|
private Integer current = 1;
|
|
@ApiModelProperty(value = "每页条数")
|
private Integer size= 10;
|
|
public Integer getCurrent() {
|
if (current == null) {
|
return 0;
|
}
|
// 处理游标
|
if (current > 0) {
|
return (current - 1) * size;
|
} else {
|
return 0;
|
}
|
}
|
}
|