Pu Zhibing
16 小时以前 cead7b98d5cebc0825b919799e23732877361de0
ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java
@@ -29,7 +29,7 @@
import com.ruoyi.common.redis.service.RedisService;
import com.ruoyi.common.security.utils.CodeFactoryUtil;
import com.ruoyi.common.security.utils.SecurityUtils;
import com.ruoyi.goods.api.domain.LotteryEvent;
import com.ruoyi.goods.api.domain.TLotteryEvent;
import com.ruoyi.goods.api.service.LotteryEventClient;
import com.ruoyi.order.config.WxPayConfiguration;
import com.ruoyi.order.domain.dto.*;
@@ -1579,10 +1579,13 @@
        appPlaceOrderVo.setPaySign(payArr[5]);
        appPlaceOrderVo.setPrepayId(orderPayment.getPrepayId());
        // 返回AppPlaceOrderVo对象
        List<LotteryEvent> data = lotteryEventClient.getLotteryEventList(2).getData();
        List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(2).getData();
        if (data.size() > 0) {
            long count = data.stream().filter(s -> s.getPayMoney().compareTo(order.getPayMoney()) >= 0).count();
            appPlaceOrderVo.setLotteryDraw(count > 0);
            List<TLotteryEvent> collect = data.stream().filter(s -> s.getPayMoney().compareTo(order.getPayMoney()) >= 0).collect(Collectors.toList());
            appPlaceOrderVo.setLotteryDraw(collect.size() > 0);
            if (collect.size() > 0) {
                appPlaceOrderVo.setLotteryEventId(collect.get(0).getEventId());
            }
        } else {
            appPlaceOrderVo.setLotteryDraw(false);
        }