src/com/shop/common/PageInfo.java

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package com.shop.common;

import java.io.Serializable;

public class PageInfo implements Serializable {

    private static final long serialVersionUID = 1L;
	
	/** 总记录 */
	private int total;
	
	/** 总页数 */
	private int totalPage;
	
	/** 数据库中limit的参数,从第几条开始取 */
	private int offset;
	
	/** 每页显示的记录数 */
	private int limit;
	
	/** 当前页 */
	private int current;
	
	/** 排序字段 */
	private String sort;
	
	/** ASC,DESC mybatis Order 关键字 */
	private String order;
	
    public PageInfo() {
		super();
	}
    
	public PageInfo(int limit, int current) {
		// 计算当前页
		if (current < 0) {
			this.current = 1;
		} else {
			// 当前页
			this.current = current;
		}
		// 记录每页显示的记录数
		if (limit < 0) {
			this.limit = limit;
		} else {
			this.limit = limit;
		}
		// 计算开始的记录和结束的记录
		this.offset = (this.current - 1) * this.limit;
	}

	// 构造方法
	public PageInfo(int current, int limit, String sort, String order) {
		// 计算当前页
		if (current < 0) {
			this.current = 1;
		} else {
			// 当前页
			this.current = current;
		}
后面还有 93 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。