From b93c729c4b7f6fb58df74c227a8d657da8abf93e Mon Sep 17 00:00:00 2001 From: WL Date: Thu, 20 Jun 2024 09:09:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug=EF=BC=9A=E7=BB=BC?= =?UTF-8?q?=E5=90=88=E7=AE=A1=E7=90=86=20=E2=80=94=20=E4=B8=89=E9=A1=B9?= =?UTF-8?q?=E5=88=B6=E5=BA=A6=E7=AE=A1=E7=90=86=20=E2=80=94=20=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E7=94=9F=E4=BA=A7=E8=B4=A3=E4=BB=BB=E5=88=B6=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=B8=8E=E6=80=BB=E6=95=B0=E4=B8=8D=E7=9B=B8=E7=AC=A6?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/TextLibraryServiceImpl.java | 11 ---------- .../depository/TextLibraryMapper.xml | 21 +++++++++++++++++-- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/zcloud/service/depository/impl/TextLibraryServiceImpl.java b/src/main/java/com/zcloud/service/depository/impl/TextLibraryServiceImpl.java index 3f29d53..0c4597f 100644 --- a/src/main/java/com/zcloud/service/depository/impl/TextLibraryServiceImpl.java +++ b/src/main/java/com/zcloud/service/depository/impl/TextLibraryServiceImpl.java @@ -92,17 +92,6 @@ public class TextLibraryServiceImpl implements TextLibraryService { */ public List list(Page page) throws Exception { List list = textlibraryMapper.datalistPage(page); - list = list.stream().parallel().distinct().collect(Collectors.toList()); - page.setTotalResult(list.size()); - if (page.getTotalResult() % page.getShowCount() == 0) - page.setTotalPage(page.getTotalResult() / page.getShowCount()); - else - page.setTotalPage(page.getTotalResult() / page.getShowCount() + 1); - if (page.getCurrentPage() <= 0) - page.getPd().put("currentResult", (page.getCurrentPage()) * page.getShowCount()); - else - page.getPd().put("currentResult", (page.getCurrentPage() - 1) * page.getShowCount()); - for (PageData entity : list) { List _labels = libraryLabelsMapper.findBylibraryId(entity); // 安全操作规程 diff --git a/src/main/resources/mybatis/datasource/depository/TextLibraryMapper.xml b/src/main/resources/mybatis/datasource/depository/TextLibraryMapper.xml index a392491..6905f4e 100644 --- a/src/main/resources/mybatis/datasource/depository/TextLibraryMapper.xml +++ b/src/main/resources/mybatis/datasource/depository/TextLibraryMapper.xml @@ -137,8 +137,25 @@