积分商品不允许使用优惠券
This commit is contained in:
parent
826c3a8f8f
commit
53f6910a34
@ -293,6 +293,8 @@ public enum ResultCode {
|
||||
COUPON_MEMBER_NOT_EXIST(41015, "没有当前会员优惠券"),
|
||||
COUPON_MEMBER_STATUS_ERROR(41016, "当前会员优惠券已过期/作废无法变更状态!"),
|
||||
|
||||
SPECIAL_CANT_USE(41020, "特殊商品不能使用优惠券,不能使用"),
|
||||
|
||||
|
||||
/**
|
||||
* 拼团
|
||||
|
@ -287,9 +287,10 @@ public class CartServiceImpl implements CartService {
|
||||
|
||||
/**
|
||||
* 当购物车商品发生变更时,取消已选择当优惠券
|
||||
*
|
||||
* @param tradeDTO
|
||||
*/
|
||||
private void remoteCoupon(TradeDTO tradeDTO){
|
||||
private void remoteCoupon(TradeDTO tradeDTO) {
|
||||
tradeDTO.setPlatformCoupon(null);
|
||||
tradeDTO.setStoreCoupons(new HashMap<>());
|
||||
}
|
||||
@ -526,6 +527,12 @@ public class CartServiceImpl implements CartService {
|
||||
AuthUser currentUser = Objects.requireNonNull(UserContext.getCurrentUser());
|
||||
//获取购物车,然后重新写入优惠券
|
||||
CartTypeEnum cartTypeEnum = getCartType(way);
|
||||
|
||||
//积分商品不允许使用优惠券
|
||||
if (cartTypeEnum.equals(CartTypeEnum.POINTS)) {
|
||||
throw new ServiceException(ResultCode.SPECIAL_CANT_USE);
|
||||
}
|
||||
|
||||
TradeDTO tradeDTO = this.readDTO(cartTypeEnum);
|
||||
|
||||
MemberCouponSearchParams searchParams = new MemberCouponSearchParams();
|
||||
|
Loading…
x
Reference in New Issue
Block a user