|
|
|
@@ -1,17 +1,12 @@ |
|
|
|
package com.iformall.service.impl; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.Result; |
|
|
|
import com.iformall.common.IdWorker; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.WxCoupon; |
|
|
|
import com.iformall.domain.po.WxCouponChannel; |
|
|
|
import com.iformall.domain.po.WxCouponMerchant; |
|
|
|
import com.iformall.domain.po.WxMerchant; |
|
|
|
import com.iformall.domain.vo.WxCouponCVo; |
|
|
|
import com.iformall.domain.vo.WxCouponChannelAddVo; |
|
|
|
import com.iformall.domain.vo.WxCouponChannelVo; |
|
|
|
@@ -22,12 +17,14 @@ import com.iformall.mapper.WxCouponMerchantMapper; |
|
|
|
import com.iformall.mapper.WxMerchantMapper; |
|
|
|
import com.iformall.service.WxCouponChannelService; |
|
|
|
import com.iformall.service.WxCouponService; |
|
|
|
import com.iformall.service.WxOrderService; |
|
|
|
import com.iformall.service.WxScreenAdService; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import com.iformall.common.IdWorker; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
@Service |
|
|
|
public class WxCouponChannelServiceImpl implements WxCouponChannelService { |
|
|
|
@@ -43,6 +40,8 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { |
|
|
|
WxCouponMerchantMapper wxCouponMerchantMapper; |
|
|
|
@Autowired |
|
|
|
WxScreenAdService wxScreenAdService; |
|
|
|
@Autowired |
|
|
|
WxOrderService wxOrderService; |
|
|
|
/** |
|
|
|
* B端业务端 |
|
|
|
* @param record |
|
|
|
@@ -97,6 +96,8 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { |
|
|
|
if (orignal.getStatus().equals(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()) |
|
|
|
&& record.getStatus().equals(EnumCouponChannelStatus.STATUS_TAKE_OFFF.getCode())) { |
|
|
|
wxScreenAdService.updateStatusByCouponChannelId(record.getId(),record.getTenantId(),EnumScreenAdStatus.INVALID.getCode()); |
|
|
|
//下架拼团券 |
|
|
|
wxOrderService.updateOrderGroupStatusByCouponChannelId(record.getId(), record.getTenantId(), EnumOrderStatus.ORDER_STATUS_COOPERATING_CANCEL.getCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
wxCouponChannelMapper.updateByPrimaryKeySelective(record); |
|
|
|
|