Commit 0577f909 by huluobin

long 序列化

parent 2a617d59
......@@ -84,7 +84,12 @@ public class CouponCustomerRelevanceServiceImpl extends ServiceImpl<CouponCustom
} else {
canUserServeIds.retainAll(orderServeList.stream()
.filter(orderServe -> orderServe.getBindCoupon() == 2)
.filter(orderServe -> orderServe.getProduceCurrentPrice().compareTo(orderServe.getProduceBargainPrice()) > -1)
.filter(orderServe -> {
if (orderServe.getProduceId() != null) {
return orderServe.getProduceCurrentPrice().compareTo(orderServe.getProduceBargainPrice()) > -1;
}
return true;
})
.filter(orderServe -> orderServe.getProducePromotionTimeId() == null)
.filter(orderServe -> orderServe.getLeisureDiscountConfigId() == null || orderServe.getLeisureDiscountConfigId() == 0)
.map(OrderServe::getServeId)
......
......@@ -634,7 +634,12 @@ public class MarketServiceImpl implements MarketService {
.filter(orderServe -> serveIds.contains(orderServe.getServeId()))
.filter(orderServe -> orderServe.getLeisureDiscountConfigId() == null || orderServe.getLeisureDiscountConfigId() == 0)
.filter(orderServe -> orderServe.getProducePromotionTimeId() == null)
.filter(orderServe -> orderServe.getProduceCurrentPrice().compareTo(orderServe.getProduceBargainPrice()) > -1)
.filter(orderServe -> {
if (orderServe.getProduceId() != null) {
return orderServe.getProduceCurrentPrice().compareTo(orderServe.getProduceBargainPrice()) > -1;
}
return true;
})
.filter(orderServe -> orderServe.getBindCoupon() == 2)
.filter(Objects::nonNull)
.collect(Collectors.toList());
......@@ -659,7 +664,12 @@ public class MarketServiceImpl implements MarketService {
.filter(orderServe -> serveIds.contains(orderServe.getServeId()))
.filter(orderServe -> orderServe.getLeisureDiscountConfigId() == null || orderServe.getLeisureDiscountConfigId() == 0)
.filter(orderServe -> orderServe.getProducePromotionTimeId() == null)
.filter(orderServe -> orderServe.getProduceCurrentPrice().compareTo(orderServe.getProduceBargainPrice()) > -1)
.filter(orderServe -> {
if (orderServe.getProduceId() != null) {
return orderServe.getProduceCurrentPrice().compareTo(orderServe.getProduceBargainPrice()) > -1;
}
return true;
})
.filter(orderServe -> orderServe.getBindCoupon() == 2)
.max(Comparator.comparing(OrderServe::getPayPrice))
.orElse(null);
......
......@@ -183,7 +183,12 @@ public class TimesCardController {
canUserServeIds.retainAll(orderServeList.stream()
.filter(orderServe -> orderServe.getBindCoupon() == 2)
.filter(orderServe -> orderServe.getProduceCurrentPrice().compareTo(orderServe.getProduceBargainPrice()) > -1)
.filter(orderServe -> {
if (orderServe.getProduceId() != null) {
return orderServe.getProduceCurrentPrice().compareTo(orderServe.getProduceBargainPrice()) > -1;
}
return true;
})
.filter(orderServe -> orderServe.getProducePromotionTimeId() == null)
.filter(orderServe -> orderServe.getLeisureDiscountConfigId() == null || orderServe.getLeisureDiscountConfigId() == 0)
.map(OrderServe::getServeId)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment