diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java index 5dcb28107..4db7b3630 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java @@ -599,6 +599,16 @@ public class WxOrderServiceImpl implements WxOrderService { cardInfo.setCreateDate(curr); cardInfo.setUpdateDate(curr); cardInfo.setSupportTransfer(coupon.getSupportTransfer()); + + //检查卡是否下架,如果是,不可转赠 + WxCouponChannel couponChannel = new WxCouponChannel(); + couponChannel.setCouponId(coupon.getId()); + couponChannel.setTenantId(user.getTenantId()); + couponChannel.setTargetAd(EnumCouponChannelType.COUPON_CHANNEL_ID_CARD.getCode()); + WxCouponChannel wxCouponChannel = wxCouponChannelMapper.selectOne(couponChannel); + if (wxCouponChannel != null && wxCouponChannel.getStatus().equals(EnumCouponChannelStatus.STATUS_TAKE_OFFF.getCode())) { + cardInfo.setSupportTransfer(EnumCouponTransfer.NO.getCode()); + } wxCardInfoMapper.insertSelective(cardInfo); } return couponOrder;