From d2232b2d49c1fbdbab8a11f5ac1a3a8ba2f2a872 Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 26 Apr 2023 11:09:04 +0800 Subject: [PATCH] //spu_sync bug --- .../com/iformall/service/impl/WxCouponChannelServiceImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java index fe4fd630f..068c6fbe3 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java @@ -144,6 +144,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { }else{ WxCouponChannel old = getById(record.getId(),record.getTenantId()); wxCoupon = wxCouponService.getById(old.getCouponId(),old.getTenantId()); + if(EnumCouponChannelStatus.STATUS_TAKE_OFFF.getCode().equals(old.getStatus()) && EnumCouponChannelStatus.STATUS_THROW_IN.getCode().equals(record.getStatus())){ if(record.getTargetAd() == null){ @@ -168,6 +169,9 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"该券未提交审核或审核未通过"); } } + if(record.getCouponId() == null){ + record.setCouponId(wxCoupon.getId()); + } if(isThrowIn){ //查找是否该券 在该频道有其他上架