From 31737adbd155f37bd5d523f93dbaf44edcf27de5 Mon Sep 17 00:00:00 2001
From: huliguo <2023611923@qq.com>
Date: 星期二, 29 七月 2025 14:39:17 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/2.0' into 2.0

---
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java |   38 ++++++++++++++++++++++++++++++++++++--
 1 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java
index 2b67c73..77f2643 100644
--- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java
@@ -402,6 +402,17 @@
         appSureOrderVo.setOrderPayMoney(orderPayMoney);
         // 设置订单商品列表
         appSureOrderVo.setAppSureOrderGoodsVoList(appSureOrderGoodsVoList);
+        appSureOrderVo.setLotteryDraw(false);
+        // 返回AppPlaceOrderVo对象
+        List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(2).getData();
+        if (data.size() > 0) {
+            BigDecimal finalOrderPayMoney = orderPayMoney;
+            List<TLotteryEvent> collect = data.stream().filter(s -> s.getPayMoney().compareTo(finalOrderPayMoney) <= 0).collect(Collectors.toList());
+            if (collect.size() > 0) {
+                appSureOrderVo.setLotteryDraw(true);
+                appSureOrderVo.setLotteryEventId(collect.get(0).getId());
+            }
+        }
         return appSureOrderVo;
     }
 
@@ -510,6 +521,17 @@
         appPanicBuyVo.setOrderGoodsMoney(orderGoodsMoney);
         appPanicBuyVo.setOrderPayDeposit(orderPayDeposit);
         appPanicBuyVo.setOrderPayMoney(orderPayMoney);
+        appPanicBuyVo.setLotteryDraw(false);
+        // 返回AppPlaceOrderVo对象
+        List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(2).getData();
+        if (data.size() > 0) {
+            BigDecimal finalOrderPayMoney = orderPayMoney;
+            List<TLotteryEvent> collect = data.stream().filter(s -> s.getPayMoney().compareTo(finalOrderPayMoney) <= 0).collect(Collectors.toList());
+            if (collect.size() > 0) {
+                appPanicBuyVo.setLotteryDraw(true);
+                appPanicBuyVo.setLotteryEventId(collect.get(0).getId());
+            }
+        }
         return appPanicBuyVo;
     }
 
@@ -841,6 +863,18 @@
             appMemberGoodsTypeDto.setUserId(userId);
             appMemberGoodsTypeDto.setGoodsTypeSet(goodsTypeSet);
             remoteMemberService.updateMemberGoodsType(appMemberGoodsTypeDto);
+        }
+
+        appPlaceOrderVo.setLotteryDraw(false);
+        // 返回AppPlaceOrderVo对象
+        List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(2).getData();
+        if (data.size() > 0) {
+            BigDecimal finalOrderPayMoney = orderPayMoney;
+            List<TLotteryEvent> collect = data.stream().filter(s -> s.getPayMoney().compareTo(finalOrderPayMoney) <= 0).collect(Collectors.toList());
+            if (collect.size() > 0) {
+                appPlaceOrderVo.setLotteryDraw(true);
+                appPlaceOrderVo.setLotteryEventId(collect.get(0).getId());
+            }
         }
         return appPlaceOrderVo;
     }
@@ -1605,7 +1639,7 @@
         // 返回AppPlaceOrderVo对象
         List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(2).getData();
         if (data.size() > 0) {
-            List<TLotteryEvent> collect = data.stream().filter(s -> s.getPayMoney().compareTo(order.getPayMoney()) >= 0).collect(Collectors.toList());
+            List<TLotteryEvent> collect = data.stream().filter(s -> s.getPayMoney().compareTo(order.getPayMoney()) <= 0).collect(Collectors.toList());
             if (collect.size() > 0) {
                 appPlaceOrderVo.setLotteryDraw(true);
                 appPlaceOrderVo.setLotteryEventId(collect.get(0).getId());
@@ -4976,7 +5010,7 @@
             orderFromList.add(meituan);
             orderFromList = bigListRemoveNull(orderFromList);
 
-            //
+
             //排行
             List<MgtMapBigTotalVo> sortedList = orderFromList.stream()
                     // 按 mapValue 降序排序,处理 null 值(若 mapValue 可能为 null)

--
Gitblit v1.7.1