商品范围
This commit is contained in:
@@ -405,6 +405,9 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
|||||||
List<Long> couponFoodIds = new ArrayList<>();
|
List<Long> couponFoodIds = new ArrayList<>();
|
||||||
if (StrUtil.isNotBlank(coupon.getFoods()) && !",".equals(coupon.getFoods())) {
|
if (StrUtil.isNotBlank(coupon.getFoods()) && !",".equals(coupon.getFoods())) {
|
||||||
couponFoodIds = Arrays.stream(coupon.getFoods().split(",")).map(Long::parseLong).toList();
|
couponFoodIds = Arrays.stream(coupon.getFoods().split(",")).map(Long::parseLong).toList();
|
||||||
|
if (CollUtil.isNotEmpty(couponFoodIds)) {
|
||||||
|
isAllFoods = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
foodsCalculate(orderDetails, isAllFoods, couponFoodIds, coupon.getDiscountNum(), "price_asc".equals(coupon.getUseRule()), prodCouponAmount);
|
foodsCalculate(orderDetails, isAllFoods, couponFoodIds, coupon.getDiscountNum(), "price_asc".equals(coupon.getUseRule()), prodCouponAmount);
|
||||||
} else if (type == 4 || type == 6) {//4-第二件半价券, 6-买一送一券
|
} else if (type == 4 || type == 6) {//4-第二件半价券, 6-买一送一券
|
||||||
@@ -416,6 +419,9 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
|||||||
List<Long> couponFoodIds = new ArrayList<>();
|
List<Long> couponFoodIds = new ArrayList<>();
|
||||||
if (StrUtil.isNotBlank(coupon.getFoods()) && !",".equals(coupon.getFoods())) {
|
if (StrUtil.isNotBlank(coupon.getFoods()) && !",".equals(coupon.getFoods())) {
|
||||||
couponFoodIds = Arrays.stream(coupon.getFoods().split(",")).map(Long::parseLong).toList();
|
couponFoodIds = Arrays.stream(coupon.getFoods().split(",")).map(Long::parseLong).toList();
|
||||||
|
if (CollUtil.isNotEmpty(couponFoodIds)) {
|
||||||
|
isAllFoods = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (type == 6) {
|
if (type == 6) {
|
||||||
oneGiftCalculate(orderDetails, isAllFoods, couponFoodIds, "price_asc".equals(coupon.getUseRule()), oneGiftAmount);
|
oneGiftCalculate(orderDetails, isAllFoods, couponFoodIds, "price_asc".equals(coupon.getUseRule()), oneGiftAmount);
|
||||||
@@ -432,6 +438,9 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
|||||||
List<Long> couponFoodIds = new ArrayList<>();
|
List<Long> couponFoodIds = new ArrayList<>();
|
||||||
if (StrUtil.isNotBlank(coupon.getFoods()) && !",".equals(coupon.getFoods())) {
|
if (StrUtil.isNotBlank(coupon.getFoods()) && !",".equals(coupon.getFoods())) {
|
||||||
couponFoodIds = Arrays.stream(coupon.getFoods().split(",")).map(Long::parseLong).toList();
|
couponFoodIds = Arrays.stream(coupon.getFoods().split(",")).map(Long::parseLong).toList();
|
||||||
|
if (CollUtil.isNotEmpty(couponFoodIds)) {
|
||||||
|
isAllFoods = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
thresholdCalculate(orderDetails, isAllFoods, couponFoodIds, coupon.getFullAmount());
|
thresholdCalculate(orderDetails, isAllFoods, couponFoodIds, coupon.getFullAmount());
|
||||||
if (type == 3) {
|
if (type == 3) {
|
||||||
|
|||||||
Reference in New Issue
Block a user