Home > Back-end >  Pagehelper paging failure
Pagehelper paging failure

Time:12-03

The dao:
PageInfo GetList (Tparams params, PageParam pageInfo);

Service:
@ Override
Public PageInfo GetList (Tparams params, PageParam pageInfo) {
PageHelper. StartPage (pageInfo. GetStart (), pageInfo. GetLength ());
Map The map=Maps. NewHashMap ();
Return new PageInfo<> (serviceType. GetList (map));
}

Controller:
@ RequestMapping (value="https://bbs.csdn.net/list")
@ ResponseBody
Public DataTable list (Tparams params, PageParam pageInfo) {
PageInfo Service=service_type. GetList (params, 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 query
Why 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
  • Related