Under PageHelper using manual page also intercepted pit

PageHelper used in the project, after all PageHelper simple and convenient.

But when the case of a Mybatis the collection label collection mapping, if the mapping sub-query is not used, then also uses the number of data error situation PageHelper will appear, this time to a select either label mapping, or is manually pagination.

I took the manual paging solutions, but when I found the time to test the interface although I have removed PageHelper.startPage (); This line of code, but it will still be intercepted at the end of my SQL and SQL LIMIT key plus for me word. In addition to the Internet, said the business call PageHelper.clearPage end () method, there is another possibility: the two parameters mapper layer transfer, that is, the page number and page size, and can not be written pageNum pageSize in accordance with the usual habit, if still with these two parameters name, then PageHelper still intercepts the SQL (true width !!! tube) for you. So my question is, these two parameters for a name just fine.

Guess you like

Origin www.cnblogs.com/yangwanhao/p/11908206.html