Home > Back-end > After PageHelper query data paging, to secondary data processing, how to update the paging informati
After PageHelper query data paging, to secondary data processing, how to update the paging informati
Time:10-04
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, delete the list in the part of the data, but the paging information is not updated automatically, how the paging information needs to be updated, please? 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); //here has a deal with the data, but not delete article number, so no impact for paging, 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 ();//here once deleted article number, paging is all messed up, don't know what to do? } } } Return the list;