Home > Back-end >  Use PageHelper after how to solve the query to delete some of the data, but the paging the same prob
Use PageHelper after how to solve the query to delete some of the data, but the paging the same prob

Time:10-18

Help you a great god
With paging PageHelper doing at present, due to a condition in the database can not break up, I do the processing in Java, part of the data deleted, but found on page paging contents did not change, how many original pages, or how many pages, just did not have the data, but the number of pages of data or unchanged, don't know this change?
The code is as follows:
 public List selectRecordMsg (Map filterMap) {
PageHelper. StartPage (Integer. The valueOf (filterMap. Get (HrConstants. PAGE_NUM). The toString ()), an Integer. The valueOf (filterMap
.get (HrConstants. PAGE_SIZE). The toString ()), "1". The equals (filterMap. Get (HrConstants. PAGE_NUM). The toString ()));

List List=recordMapper. SelectAllMsg (filterMap);
For (RecordDto RecordDto: list) {
ChangeDemand (recordDto);
BuildPersonName (recordDto);
}
//the following data is based on the condition to delete a few lines
If (a condition when processing data) {
String personName=filterMap. Get (" personName "). The toString ();
Iterator It=list. The iterator ();
While (it. HasNext ()) {
RecordDto dic=it. Next ();
If () while some condition {
It. The remove ();
}
}
}
Return the list;



Pray god help!

CodePudding user response:

Don't should put, interface returns the result of you not to use PageInfo<> (list), the list of those are processed according to conditions of the list you ah, you have to return the result of the information about pageHelper sends out to see

CodePudding user response:

Remove after get the list, and then to set PageHelp

CodePudding user response:

I also encountered this problem, how to solve ah
  • Related