package com.qmth.qrzk.repository.service.query;

public class QueryParams {
	private Integer page = 1;//分页数，从1开始
	private Integer rows = 10;//一页最多多少条
	private Integer totalNum;//记录总条数
	private String keyword;

	public Integer getPage() {
		return page;
	}

	public void setPage(Integer page) {
		this.page = page;
	}

	public Integer getRows() {
		return rows;
	}

	public void setRows(Integer rows) {
		this.rows = rows;
	}
	
	public int getOffset(){
		if(page > 0)
			return (page - 1) * rows;
		else
			return 0;
	}

	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword.trim();
	}

	public Integer getTotalNum() {
		return totalNum;
	}

	public void setTotalNum(Integer totalNum) {
		this.totalNum = totalNum;
	}
}
