From e675b4b2e5d23bdc4bde9ad31a88bd349f35bc96 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Fri, 2 Feb 2024 14:30:09 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E7=94=A8=E4=BE=8B=E7=AE=A1=E7=90=86):?= =?UTF-8?q?=20=E8=AF=84=E5=AE=A1=E5=8E=86=E5=8F=B2=E5=80=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../functional/mapper/ExtCaseReviewHistoryMapper.xml | 1 + .../functional/service/FunctionalCaseReviewService.java | 2 +- .../functional/service/ReviewFunctionalCaseService.java | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewHistoryMapper.xml b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewHistoryMapper.xml index b814a3f4e5..e1791eefdb 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewHistoryMapper.xml +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewHistoryMapper.xml @@ -45,6 +45,7 @@ and ch.review_id = #{reviewId} + order by ch.create_time desc diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseReviewService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseReviewService.java index c8542be70a..5c575e339e 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseReviewService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseReviewService.java @@ -36,7 +36,7 @@ public class FunctionalCaseReviewService { } public List getCaseReviewHistory(String caseId) { - List list = extCaseReviewHistoryMapper.list(caseId, null); + List list = extCaseReviewHistoryMapper.getHistoryListWidthAbandoned(caseId, null); for (CaseReviewHistoryDTO caseReviewHistoryDTO : list) { if (StringUtils.equalsIgnoreCase(caseReviewHistoryDTO.getCreateUser(), "system")) { caseReviewHistoryDTO.setUserName(Translator.get("case_review_history.system")); diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/ReviewFunctionalCaseService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/ReviewFunctionalCaseService.java index 05a2dfd37c..7e55821463 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/ReviewFunctionalCaseService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/ReviewFunctionalCaseService.java @@ -213,6 +213,6 @@ public class ReviewFunctionalCaseService { caseReviewHistoryDTO.setContentText(new String(caseReviewHistoryDTO.getContent(), StandardCharsets.UTF_8)); } } - return list.stream().sorted(Comparator.comparing(CaseReviewHistoryDTO::getCreateTime).reversed()).toList(); + return list; } }