From ddafb777fc9ef27f71334731a7b5324ebb55f4c7 Mon Sep 17 00:00:00 2001 From: winter <664946893@qq.com> Date: Sat, 31 Jan 2026 13:30:30 +0800 Subject: [PATCH] fix --- .../impl/WxCouponChannelServiceImpl.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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 f337d69f4..af79fb0e9 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java @@ -776,8 +776,22 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { wxCouponChannel.setSubBusiness(wxCoupon.getSubBusiness()); wxCouponChannel.setTitle(wxCoupon.getTitle()); wxCouponChannel.setTtSpuId(wxCoupon.getGoodsId()); - wxCouponChannel.setChannelPrice(channelPrice); - wxCouponChannel.setChannelStock(channelStock); + //如果是直播渠道,未设置库存和价格,则用优惠券的 + if (null != channelId && channelId.intValue() == EnumCouponChannelType.COUPON_CHANNEL_ID_WXLIVE_LIST.getCode().intValue()) { + if (null != channelPrice) { + wxCouponChannel.setChannelPrice(channelPrice); + }else { + wxCouponChannel.setChannelPrice(wxCoupon.getSalePrice()); + } + if (null != channelStock) { + wxCouponChannel.setChannelStock(channelStock); + }else { + wxCouponChannel.setChannelStock(wxCoupon.getRemainInventory()); + } + }else { + wxCouponChannel.setChannelPrice(channelPrice); + wxCouponChannel.setChannelStock(channelStock); + } ResultData resultData = saveOrUpdate(wxCouponChannel); WxCouponChannel channel = (WxCouponChannel)resultData.data;