huliguo
5 天以前 31737adbd155f37bd5d523f93dbaf44edcf27de5
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());