CodePudding user response:
This problem is too big is too general, let people don't know how to answer, they said the back-end, query way of JDBC, hibernate, jpa, mybatis that several kinds of every kind of way of query, paging, code is different, you still more system under the study of firstCodePudding user response:
You said the paging concept was actually a bit fuzzy, do you want to be paged or need to query for each query fixed number?The former, you can once get all the qualified data, and then through the front-end control, according to
The latter is a little bit of trouble, can send the request back when click the page number at the front end, the request attached pages (pageNo) and each page article number (pageSize), and then through the SQL statements add restrictions to control the query data (similar to the first floor, select the database connection in a different way, specific writing is different, but this can be according to the situation of baidu)
CodePudding user response:
Front page, is the back-end you put all the data is returned to you the inside an array, or else you take 10 pages,Backend paging, is the front end with parameters into the backend, such as the first page, each page 10 to give in to the SQL database is then only take this article 10 data back to the front end
CodePudding user response:
Front call interface was introduced into the page, pageSize is the number of pages and each page shows article how muchInt the begin=(page 1) * pageSize
The back-end query SQL using limit the begin, pageSize
CodePudding user response:
Implementation:1, through the database operations statement:
Select * from table limit 0, 8 # just for an example of paging query
As to how the backend logic control, need you think, the best combination of Ajax requests to write, better ha
2, the use of plug-in pageHelper I haven't tried this, look at the others used
CodePudding user response:
This should meet your requirements, you can refer to https://blog.csdn.net/Easet/article/details/99588673CodePudding user response:
You can go to search, a lot of, can be custom tools can also use mybatis paging plug-in implementation, paging logic to find online, according to the demand paging, not looking for a videoCodePudding user response:
Introduction can try to write the words after the front end, SQL statements mainly use limit keywords, front-end needs pageSize and pageNum two values, the back-end according to these two values encapsulate data back to the front show, after the implementation can use general mapper maybatis plug-in, principle also understand,CodePudding user response: