|
|
@@ -425,7 +425,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- //返还优惠卷
|
|
|
+ //返还优惠券
|
|
|
if (orderDon.getCouponUserId() != 0) {
|
|
|
updateOrderDonCouponStatus(orderDon);
|
|
|
}
|
|
|
@@ -1070,13 +1070,13 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
}
|
|
|
couponUser = new CouponUser();
|
|
|
couponUser.setCouponId(exists.getCouponId());
|
|
|
- if (exists.getCouponId() == null) {
|
|
|
+ if (exists.getPopularizeId() != null) {
|
|
|
couponUser.setCouponId(exists.getPopularizeCouponId());
|
|
|
couponUser.setPopularizeId(exists.getPopularizeId());
|
|
|
}
|
|
|
CouponUser received = couponUserMapper.selectOne(Wrappers.lambdaQuery(CouponUser.class).eq(CouponUser::getUserId, userId).eq(CouponUser::getCouponId, couponUser.getCouponId()).last("limit 1"));
|
|
|
if (received != null && received.getStatus() != CouponUser.Status.unused) {
|
|
|
- throw BusinessRuntimeException.getInstance("该优惠券已使用");
|
|
|
+ throw BusinessRuntimeException.getInstance("您已使用该优惠码所对应的优惠券");
|
|
|
}
|
|
|
couponUser.setUserId(userId);
|
|
|
couponUser.setStatus(CouponUser.Status.used);
|