霸王餐充值
This commit is contained in:
parent
bb0aa1f5da
commit
13d3e70c84
|
|
@ -351,7 +351,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
|||
|
||||
// 积分校验
|
||||
PointsBasicSetting pointSetting = pointsBasicService.getById(shopId);
|
||||
if ((param.isFreeDine() && param.isWithPoints()) || (!param.isFreeDine() && param.getPointsNum() > 0)) {
|
||||
if (param.getPointsNum() > 0 && (!param.isFreeDine() || param.isWithPoints())) {
|
||||
if (pointSetting == null || !pointSetting.getEnableDeduction().equals(1)) {
|
||||
throw new ValidateException("生成支付订单失败,该店铺未开启积分抵扣");
|
||||
}
|
||||
|
|
@ -397,7 +397,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
|||
}
|
||||
|
||||
//优惠券部分 目前规则 每个券只能用一张
|
||||
if ((param.isFreeDine() && param.isWithCoupon()) || (!param.isFreeDine() && CollUtil.isNotEmpty(param.getCouponList()))){
|
||||
if (CollUtil.isNotEmpty(param.getCouponList()) && (!param.isFreeDine() || param.isWithCoupon())){
|
||||
QueryWrapper couponRecordQuery = new QueryWrapper();
|
||||
couponRecordQuery.in(MkShopCouponRecord::getId, param.getCouponList());
|
||||
couponRecordQuery.le(MkShopCouponRecord::getUseStartTime, LocalDateTime.now());
|
||||
|
|
|
|||
Loading…
Reference in New Issue