| | |
| | | // 返回AppPlaceOrderVo对象 |
| | | 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); |
| | | } |