PageInfo
Service:
@ Override
Public PageInfo
PageHelper. StartPage (pageInfo. GetStart (), pageInfo. GetLength ());
Map
Return new PageInfo<> (serviceType. GetList (map));
}
Controller:
@ RequestMapping (value="https://bbs.csdn.net/list")
@ ResponseBody
Public DataTable list (Tparams params, PageParam pageInfo) {
PageInfo
Return new DataTable (pageInfo getDraw (), service. GetTotal (), service. The getList ());
}
Point on the next page no data
CodePudding user response:
Did see the SQL log perform paging queryWhy do you want to look at page
CodePudding user response:
Select id, service_no service_name service_price, custom_price, unit, service_type, remark, pid, isCheckbox from w_set_service where id & gt; 2 the order by service_no asc LIMIT 90,LIMIT 90, this is wrong
CodePudding user response:
Pagehelper is written according to the thread local variable, and use it every time it is important to note that pagehelper) startPage (pageInfo. GetStart (), pageInfo. GetLength ()); Behind the paging must follow the query SQL statement, follow closely. If any judgment not, on a line PageHelper) startPage next line must be the query SQL statement, or it will failure