From a5cdf202f1e925ea2dbedeef57791804a547dc8e Mon Sep 17 00:00:00 2001 From: sj <1304317391@qq.com> Date: Mon, 14 Nov 2022 11:10:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E5=8D=95=E6=97=B6=E5=80=99=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E9=80=89=E6=8B=A9=E4=BC=98=E6=83=A0=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E6=9C=80=E5=A4=A7=E7=9A=84=E4=BC=98=E6=83=A0=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/order/service/impl/YxStoreOrderServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java b/zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java index 1d329091..a0da94b5 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java @@ -269,6 +269,11 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl1){ + Collections.sort(storeCouponUsers, (couponUserVo1, couponUserVo2) -> couponUserVo1.getCouponPrice()>couponUserVo2.getCouponPrice()? -1:(couponUserVo1.getCouponPrice()==couponUserVo2.getCouponPrice()? 0:1)); + } + //选出优惠金额最大的券 storeCouponUser = storeCouponUsers.get(0); }