From 6058af744bdf4fe6a3856c46fe31cfb4dbd8e255 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期二, 29 七月 2025 11:54:01 +0800 Subject: [PATCH] 修改bug --- ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 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 68504f4..d18f9d1 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; } @@ -1605,7 +1627,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()); -- Gitblit v1.7.1