From 48df154dd75d7ba86be1f9752d9cd76243e78bf5 Mon Sep 17 00:00:00 2001 From: Bleachtred Date: Thu, 20 Jul 2023 06:26:55 +0000 Subject: [PATCH] =?UTF-8?q?add=20Java/BSupplierServiceImpl.java.=20?= =?UTF-8?q?=E6=98=8E=E6=98=8E=E5=8F=AA=E6=98=AF=E6=8C=89=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E7=8A=B6=E6=80=81=EF=BC=8C=E6=80=8E=E4=B9=88?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=B0=B1=E6=B0=B8=E8=BF=9C=E5=8F=AA=E6=9C=89?= =?UTF-8?q?10=E6=9D=A1=E8=AE=B0=E5=BD=95=E5=91=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Java/BSupplierServiceImpl.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Java/BSupplierServiceImpl.java diff --git a/Java/BSupplierServiceImpl.java b/Java/BSupplierServiceImpl.java new file mode 100644 index 0000000..95fcf6d --- /dev/null +++ b/Java/BSupplierServiceImpl.java @@ -0,0 +1,19 @@ + +// 明明只是按需求过滤状态,怎么查询就永远只有10条记录呢 +public TableDataInfo selectPage(BSupplier query, PageQuery pageQuery) { + Page page = baseMapper.selectPage(pageQuery.build(), wrapper(query)); + TableDataInfo dataInfo = TableDataInfo.build(page); + List rows = dataInfo.getRows(); + if (CollUtil.isNotEmpty(rows)) { + // 如果是状态0 就把不是0的干掉 + if ("0".equals(query.getMonthRt())){ + rows.removeIf(e -> !"0".equals(e.getMonthRt())); + // 如果是状态1 就把不是1的干掉 + }else if ("1".equals(query.getMonthRt())){ + rows.removeIf(e -> !"1".equals(e.getMonthRt())); + } + dataInfo.setRows(rows); + dataInfo.setTotal(rows.size()); + } + return dataInfo; +} \ No newline at end of file -- Gitee