From 338ab9eeae8fdb8afa21169aee602469c8b643ab Mon Sep 17 00:00:00 2001 From: wenhui <1455474577@qq.com> Date: Tue, 15 Mar 2022 14:53:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=91=E7=A5=A8=E5=BC=80?= =?UTF-8?q?=E7=A5=A8=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F=E9=97=AE=E9=A2=98=EF=BC=8C=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E7=9A=84=E5=9C=A8=E4=B8=8A=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xhpc/invoice/service/impl/XhpcInvoiceServiceImpl.java | 5 ++--- .../src/main/resources/mapper/XhpcInvoiceMapper.xml | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) 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}