In view of the above ideas, firstly, a new paging parameter entity class named PagenateArgs and an enumeration class named SortDirectionEnum are created under demo.mybatis.model, which contains the current pageIndex pageSize, and the current page displays the number of business records, and the pageStart property indicates which entry to start with. (pageStart=pageIndex*pageSize) Because the usage of the limit keyword means the initial number of articles (not included), take a few articles, orderFieldStr sort field, and orderDirectionStr sort direction, so the specific creation is as follows:
Package David.mybatis.model;
/*
* Paging parameter entity class
*/
Public class PagenateArgs {
private int pageIndex
private int pageSize
private int pageStart
Private string orderFieldStr
Private string orderDirectionStr
Public PagenateArgs() {
// TODO automatically generated constructor stub
}