This commit is contained in:
even 2025-05-19 10:44:19 +08:00
commit 5101584b68
2 changed files with 19 additions and 16 deletions

View File

@ -1,7 +1,6 @@
package cd.casic.ci.common.pipeline.utils;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.PageUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;
@ -34,10 +33,10 @@ public class PageResult<T> implements Serializable {
*/
private Integer pageSize = 20;
/**
* 总页数
*/
private Integer totalPage = 0;
// /**
// * 总页数
// */
// private Integer totalPage = 0;
/**
* 总记录数
@ -49,10 +48,10 @@ public class PageResult<T> implements Serializable {
*/
private List<T> list;
/**
* 分页彩虹
*/
private int[] rainbow;
// /**
// * 分页彩虹
// */
// private int[] rainbow;
public PageResult() {
}
@ -68,8 +67,8 @@ public class PageResult<T> implements Serializable {
this.setTotal(Convert.toInt(page.getTotal()));
this.setPageNo(Convert.toInt(page.getCurrent()));
this.setPageSize(Convert.toInt(page.getSize()));
this.setRainbow(PageUtil.rainbow(Convert.toInt(page.getCurrent()),
Convert.toInt(this.getTotalPage()), RAINBOW_NUM));
// this.setRainbow(PageUtil.rainbow(Convert.toInt(page.getCurrent()),
// Convert.toInt(this.getTotalPage()), RAINBOW_NUM));
}
/**
@ -84,9 +83,9 @@ public class PageResult<T> implements Serializable {
this.setTotal(Convert.toInt(page.getTotal()));
this.setPageNo(Convert.toInt(page.getCurrent()));
this.setPageSize(Convert.toInt(page.getSize()));
this.setTotalPage(PageUtil.totalPage(Convert.toInt(page.getTotal()),
Convert.toInt(page.getSize())));
this.setRainbow(PageUtil.rainbow(Convert.toInt(page.getCurrent()),
Convert.toInt(this.getTotalPage()), RAINBOW_NUM));
// this.setTotalPage(PageUtil.totalPage(Convert.toInt(page.getTotal()),
// Convert.toInt(page.getSize())));
// this.setRainbow(PageUtil.rainbow(Convert.toInt(page.getCurrent()),
// Convert.toInt(this.getTotalPage()), RAINBOW_NUM));
}
}

View File

@ -178,3 +178,7 @@ ops:
- mail_template
debug: false
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl