|
|
|
@ -269,6 +269,11 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
|
|
|
|
|
|
|
|
|
|
StoreCouponUserVo storeCouponUser = null; |
|
|
|
|
if (storeCouponUsers != null && !storeCouponUsers.isEmpty()) { |
|
|
|
|
//如果有多张优惠券,就进行比较,按优惠金额排序
|
|
|
|
|
if (storeCouponUsers.size()>1){ |
|
|
|
|
Collections.sort(storeCouponUsers, (couponUserVo1, couponUserVo2) -> couponUserVo1.getCouponPrice()>couponUserVo2.getCouponPrice()? -1:(couponUserVo1.getCouponPrice()==couponUserVo2.getCouponPrice()? 0:1)); |
|
|
|
|
} |
|
|
|
|
//选出优惠金额最大的券
|
|
|
|
|
storeCouponUser = storeCouponUsers.get(0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|