|
|
|
@@ -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; |
|
|
|
|