优惠券问题
This commit is contained in:
parent
a904f555b3
commit
965c88eb3a
|
|
@ -449,9 +449,10 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
|||
private void checkCoupon(Map<Long, Integer> prodCouponMap, BigDecimalDTO fullAmount, BigDecimalDTO discountAmount, CheckOrderPay param) {
|
||||
if (CollUtil.isNotEmpty(param.getCouponList())) {
|
||||
//校验优惠券
|
||||
List<ShopActivateCouponRecord> records = couponRecordService.list(QueryWrapper.create()
|
||||
List<ShopActivateCouponRecord> records = couponRecordService.listAs(
|
||||
QueryWrapper.create()
|
||||
.where(ShopActivateCouponRecord::getId).in(param.getCouponList())
|
||||
.and(ShopActivateCouponRecord::getStatus).eq(0));
|
||||
.and(ShopActivateCouponRecord::getStatus).eq(0),ShopActivateCouponRecord.class);
|
||||
if (CollUtil.isEmpty(records)) {
|
||||
throw new ValidateException("生成支付订单失败,优惠券信息不存在");
|
||||
} else if (records.size() != param.getCouponList().size()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue