Commit 2c6e1c34 by huluobin

判断折扣券是否可用 判断0元服务

parent 56271869
......@@ -24,6 +24,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Objects;
......@@ -80,12 +81,14 @@ public class CouponCustomerRelevanceServiceImpl extends ServiceImpl<CouponCustom
canUserServeIds.retainAll(orderServeList.stream()
.filter(orderServe -> orderServe.getBindOuterCoupon() == 2)
.filter(orderServe -> orderServe.getBindTimesCard() == 2)
.filter(orderServe -> orderServe.getPayPrice().compareTo(BigDecimal.ZERO)>0)
.map(OrderServe::getServeId)
.collect(Collectors.toList()));
} else {
canUserServeIds.retainAll(orderServeList.stream()
.filter(orderServe -> orderServe.getBindOuterCoupon() == 2)
.filter(orderServe -> orderServe.getBindTimesCard() == 2)
.filter(orderServe -> orderServe.getPayPrice().compareTo(BigDecimal.ZERO)>0)
//不是活动价格
.filter(orderServe -> !orderServe.isActivity())
.map(OrderServe::getServeId)
......
......@@ -23,4 +23,5 @@ public class WorksImages {
private String imageUrl;
private Date createDate;
}
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