From 4a751897562845f085d35ad929a34220defb488f Mon Sep 17 00:00:00 2001 From: lulz1 Date: Mon, 1 Jul 2024 08:58:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BC=98=E5=8C=96=E8=A1=8C=E7=A8=8B?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E5=8F=98=E6=9B=B4=E5=8E=9F=E5=9B=A0=E7=9A=84?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/chint/domain/aggregates/order/Leg.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/chint/domain/aggregates/order/Leg.java b/src/main/java/com/chint/domain/aggregates/order/Leg.java index 0ea76243..87dddc3b 100644 --- a/src/main/java/com/chint/domain/aggregates/order/Leg.java +++ b/src/main/java/com/chint/domain/aggregates/order/Leg.java @@ -253,12 +253,11 @@ public class Leg implements Serializable, EventManageable { } - //添加变更理由 - this.eventList - .stream() + // 添加变更理由 + this.eventList.stream() .filter(legEvent -> legEvent.getEventType().equals(LEG_EVENT_CHANGE)) - .max(Comparator.comparingLong(LegEvent::getLegEventId)) - .ifPresent(legEvent -> this.changeReason = legEvent.getExtension()); + .max(Comparator.comparing(LegEvent::getHappenTime)) + .ifPresent(latestChangeEvent -> this.changeReason = latestChangeEvent.getExtension()); if (this.legApprovalEventList == null || this.legApprovalEventList.isEmpty()) { this.legApprovalStatus = LEG_APPROVAL_STATUS_NOT;