From b104c359a81e91b74643d174c6ca5c68c17f89ed Mon Sep 17 00:00:00 2001 From: gongbiao Date: Mon, 5 Aug 2019 17:07:11 +0800 Subject: [PATCH] =?UTF-8?q?[C=E7=AB=AF=E6=B6=88=E8=B4=B9=E5=8D=A1][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E6=94=AF=E4=BB=98=E6=97=B6=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=98=AF=E5=90=A6=E5=B7=B2=E4=B8=8B=E6=9E=B6=EF=BC=8C?= =?UTF-8?q?=E4=B8=8B=E6=9E=B6=E5=90=8E=E5=8D=A1=E4=B8=8D=E5=8F=AF=E8=BD=AC?= =?UTF-8?q?=E8=B5=A0]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/service/impl/WxOrderServiceImpl.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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;