diff --git a/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/service/impl/XhpcInvoiceServiceImpl.java b/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/service/impl/XhpcInvoiceServiceImpl.java index dce30752..3d3be6ec 100644 --- a/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/service/impl/XhpcInvoiceServiceImpl.java +++ b/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/service/impl/XhpcInvoiceServiceImpl.java @@ -316,15 +316,14 @@ public class XhpcInvoiceServiceImpl implements XhpcInvoiceService { allGroupingRecords.put(monitor, split); //存放至包装类中 Set keys = allGroupingRecords.keySet(); - //对key进行反向排序,保证封装的数据是反着的 ArrayList tempKeyList = new ArrayList<>(); for (String key : keys) { tempKeyList.add(key); } - // 创建一个游标在迭代器末尾的迭代器 + //创建一个游标在迭代器末尾的迭代器 ListIterator stringListIterator = tempKeyList.listIterator(tempKeyList.size()); - // 然后反向遍历 + //然后反向遍历 ArrayList keyList = new ArrayList<>(); while (stringListIterator.hasPrevious()) { keyList.add(stringListIterator.previous()); diff --git a/xhpc-modules/xhpc-invoice/src/main/resources/mapper/XhpcInvoiceMapper.xml b/xhpc-modules/xhpc-invoice/src/main/resources/mapper/XhpcInvoiceMapper.xml index 515c407a..a0156d14 100644 --- a/xhpc-modules/xhpc-invoice/src/main/resources/mapper/XhpcInvoiceMapper.xml +++ b/xhpc-modules/xhpc-invoice/src/main/resources/mapper/XhpcInvoiceMapper.xml @@ -190,6 +190,7 @@ WHERE del_flag IS NULL AND creator_id = #{creatorId} AND creator_type = #{creatorType} + ORDER BY create_time DESC LIMIT #{currentPage}, #{items}