优惠券问题
This commit is contained in:
@@ -449,9 +449,10 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
|||||||
private void checkCoupon(Map<Long, Integer> prodCouponMap, BigDecimalDTO fullAmount, BigDecimalDTO discountAmount, CheckOrderPay param) {
|
private void checkCoupon(Map<Long, Integer> prodCouponMap, BigDecimalDTO fullAmount, BigDecimalDTO discountAmount, CheckOrderPay param) {
|
||||||
if (CollUtil.isNotEmpty(param.getCouponList())) {
|
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())
|
.where(ShopActivateCouponRecord::getId).in(param.getCouponList())
|
||||||
.and(ShopActivateCouponRecord::getStatus).eq(0));
|
.and(ShopActivateCouponRecord::getStatus).eq(0),ShopActivateCouponRecord.class);
|
||||||
if (CollUtil.isEmpty(records)) {
|
if (CollUtil.isEmpty(records)) {
|
||||||
throw new ValidateException("生成支付订单失败,优惠券信息不存在");
|
throw new ValidateException("生成支付订单失败,优惠券信息不存在");
|
||||||
} else if (records.size() != param.getCouponList().size()) {
|
} else if (records.size() != param.getCouponList().size()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user