Просмотр исходного кода

//coupon_channel

release_toaliyun_real
xhxu 3 лет назад
Родитель
Сommit
a36ab119be
10 измененных файлов: 338 добавлений и 4 удалений
  1. +10
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponChannelController.java
  2. +302
    -0
      mallinkAdmin/src/main/resources/db/migration/V2022092600001__add_coupon_channel.sql
  3. +15
    -0
      mallinkBApi/src/main/java/com/iformall/controller/WxCouponChannelController.java
  4. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxCouponChannel.java
  5. +1
    -0
      mallinkService/src/main/java/com/iformall/service/impl/TtCouponGoodsServiceImpl.java
  6. +1
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCampaignServiceImpl.java
  7. +1
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java
  8. +1
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxGameServiceImpl.java
  9. +2
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxTopicServiceImpl.java
  10. +3
    -2
      mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml

+ 10
- 1
mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponChannelController.java Просмотреть файл

@@ -3,6 +3,7 @@ package com.iformall.controller.market;
import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageInfo;
import com.iformall.annotation.SystemControllerLog;
import com.iformall.common.ErrorCode;
import com.iformall.common.Result;
import com.iformall.common.ResultData;
import com.iformall.controller.base.BaseController;
@@ -11,6 +12,7 @@ import com.iformall.domain.po.*;
import com.iformall.domain.vo.WxCouponChannelVo;
import com.iformall.enums.EnumCouponSourceType;
import com.iformall.domain.po.base.BaseEntity;
import com.iformall.enums.EnumCouponStatus;
import com.iformall.exception.MallinkException;
import com.iformall.service.WxCouponChannelService;
import com.iformall.service.WxCouponService;
@@ -87,7 +89,14 @@ public class WxCouponChannelController extends BaseController {
public ResultData update(@RequestBody WxCouponChannel wxCouponChannel) {
logger.debug("[" + getIpAddr() + "] WxCouponChannelController::update");
wxCouponChannel.updateTenantInfo(getTenantInfo());

if(wxCouponChannel.getCouponId() == null){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"couponId为空");
}
WxCoupon wxCoupon = wxCouponService.getById(wxCouponChannel.getCouponId(),wxCouponChannel.getTenantId());
if(wxCoupon == null || EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(wxCoupon.getStatus())){
return new ResultData(ErrorCode.COUPON_IS_EMPTY.getCode(),"此券不存在或已过期");
}
wxCouponChannel.setMakeMerchantId(wxCoupon.getMakeMerchantId());
ResultData resultData = wxCouponChannelService.saveOrUpdate(wxCouponChannel);
WxCouponChannel couponChannel = (WxCouponChannel)resultData.data;
//生成二维码


+ 302
- 0
mallinkAdmin/src/main/resources/db/migration/V2022092600001__add_coupon_channel.sql Просмотреть файл

@@ -0,0 +1,302 @@
ALTER TABLE `mallink`.`wx_coupon_channel_0`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_1`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_2`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_3`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_4`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_5`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_6`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_7`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_8`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_9`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_10`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_11`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_12`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_13`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_14`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_15`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_16`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_17`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_18`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_19`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_20`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_21`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_22`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_23`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_24`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_25`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_26`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_27`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_28`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_29`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_30`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_31`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_32`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_33`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_34`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_35`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_36`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_37`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_38`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_39`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_40`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_41`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_42`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_43`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_44`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_45`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_46`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_47`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_48`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_49`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_50`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_51`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_52`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_53`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_54`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_55`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_56`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_57`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_58`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_59`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_60`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_61`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_62`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_63`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_64`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_65`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_66`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_67`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_68`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_69`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_70`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_71`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_72`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_73`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_74`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_75`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_76`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_77`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_78`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_79`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_80`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_81`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_82`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_83`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_84`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_85`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_86`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_87`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_88`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_89`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_90`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_91`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_92`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_93`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_94`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_95`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_96`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_97`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_98`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;
ALTER TABLE `mallink`.`wx_coupon_channel_99`
ADD COLUMN `make_merchant_id` bigint(20) NOT NULL DEFAULT 0 AFTER `coupon_id`;


update `wx_coupon_channel_0` wcc left join wx_coupon_0 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_1` wcc left join wx_coupon_1 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_2` wcc left join wx_coupon_2 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_3` wcc left join wx_coupon_3 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_4` wcc left join wx_coupon_4 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_5` wcc left join wx_coupon_5 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_6` wcc left join wx_coupon_6 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_7` wcc left join wx_coupon_7 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_8` wcc left join wx_coupon_8 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_9` wcc left join wx_coupon_9 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_10` wcc left join wx_coupon_10 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_11` wcc left join wx_coupon_11 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_12` wcc left join wx_coupon_12 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_13` wcc left join wx_coupon_13 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_14` wcc left join wx_coupon_14 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_15` wcc left join wx_coupon_15 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_16` wcc left join wx_coupon_16 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_17` wcc left join wx_coupon_17 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_18` wcc left join wx_coupon_18 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_19` wcc left join wx_coupon_19 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_20` wcc left join wx_coupon_20 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_21` wcc left join wx_coupon_21 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_22` wcc left join wx_coupon_22 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_23` wcc left join wx_coupon_23 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_24` wcc left join wx_coupon_24 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_25` wcc left join wx_coupon_25 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_26` wcc left join wx_coupon_26 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_27` wcc left join wx_coupon_27 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_28` wcc left join wx_coupon_28 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_29` wcc left join wx_coupon_29 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_30` wcc left join wx_coupon_30 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_31` wcc left join wx_coupon_31 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_32` wcc left join wx_coupon_32 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_33` wcc left join wx_coupon_33 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_34` wcc left join wx_coupon_34 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_35` wcc left join wx_coupon_35 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_36` wcc left join wx_coupon_36 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_37` wcc left join wx_coupon_37 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_38` wcc left join wx_coupon_38 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_39` wcc left join wx_coupon_39 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_40` wcc left join wx_coupon_40 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_41` wcc left join wx_coupon_41 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_42` wcc left join wx_coupon_42 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_43` wcc left join wx_coupon_43 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_44` wcc left join wx_coupon_44 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_45` wcc left join wx_coupon_45 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_46` wcc left join wx_coupon_46 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_47` wcc left join wx_coupon_47 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_48` wcc left join wx_coupon_48 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_49` wcc left join wx_coupon_49 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_50` wcc left join wx_coupon_50 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_51` wcc left join wx_coupon_51 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_52` wcc left join wx_coupon_52 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_53` wcc left join wx_coupon_53 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_54` wcc left join wx_coupon_54 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_55` wcc left join wx_coupon_55 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_56` wcc left join wx_coupon_56 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_57` wcc left join wx_coupon_57 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_58` wcc left join wx_coupon_58 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_59` wcc left join wx_coupon_59 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_60` wcc left join wx_coupon_60 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_61` wcc left join wx_coupon_61 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_62` wcc left join wx_coupon_62 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_63` wcc left join wx_coupon_63 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_64` wcc left join wx_coupon_64 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_65` wcc left join wx_coupon_65 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_66` wcc left join wx_coupon_66 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_67` wcc left join wx_coupon_67 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_68` wcc left join wx_coupon_68 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_69` wcc left join wx_coupon_69 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_70` wcc left join wx_coupon_70 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_71` wcc left join wx_coupon_71 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_72` wcc left join wx_coupon_72 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_73` wcc left join wx_coupon_73 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_74` wcc left join wx_coupon_74 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_75` wcc left join wx_coupon_75 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_76` wcc left join wx_coupon_76 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_77` wcc left join wx_coupon_77 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_78` wcc left join wx_coupon_78 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_79` wcc left join wx_coupon_79 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_80` wcc left join wx_coupon_80 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_81` wcc left join wx_coupon_81 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_82` wcc left join wx_coupon_82 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_83` wcc left join wx_coupon_83 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_84` wcc left join wx_coupon_84 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_85` wcc left join wx_coupon_85 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_86` wcc left join wx_coupon_86 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_87` wcc left join wx_coupon_87 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_88` wcc left join wx_coupon_88 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_89` wcc left join wx_coupon_89 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_90` wcc left join wx_coupon_90 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_91` wcc left join wx_coupon_91 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_92` wcc left join wx_coupon_92 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_93` wcc left join wx_coupon_93 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_94` wcc left join wx_coupon_94 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_95` wcc left join wx_coupon_95 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_96` wcc left join wx_coupon_96 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_97` wcc left join wx_coupon_97 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_98` wcc left join wx_coupon_98 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;
update `wx_coupon_channel_99` wcc left join wx_coupon_99 wc on wc.id = wcc.coupon_id set wcc.`make_merchant_id` = wc.`make_merchant_id` where wc.`make_merchant_id` is not null and wc.`make_merchant_id` != 0;

+ 15
- 0
mallinkBApi/src/main/java/com/iformall/controller/WxCouponChannelController.java Просмотреть файл

@@ -2,13 +2,17 @@ package com.iformall.controller;

import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageInfo;
import com.iformall.common.ErrorCode;
import com.iformall.common.Result;
import com.iformall.common.ResultData;
import com.iformall.domain.dto.WxCouponChannelDto;
import com.iformall.domain.po.WxCoupon;
import com.iformall.domain.po.WxCouponChannel;
import com.iformall.domain.po.base.BaseEntity;
import com.iformall.domain.vo.WxCouponChannelVo;
import com.iformall.enums.EnumCouponStatus;
import com.iformall.service.WxCouponChannelService;
import com.iformall.service.WxCouponService;
import com.iformall.service.util.CouponCacheUtils;

import io.swagger.annotations.Api;
@@ -36,6 +40,9 @@ public class WxCouponChannelController extends BaseController {

@Autowired
private WxCouponChannelService wxCouponChannelService;

@Autowired
private WxCouponService wxCouponService;
@Autowired
@Qualifier("objectCommonRedisTemplate")
@@ -69,6 +76,14 @@ public class WxCouponChannelController extends BaseController {
public ResultData update(@RequestBody WxCouponChannel wxCouponChannel) {
logger.debug("[" + getIpAddr() + "] WxCouponChannelController::update");
wxCouponChannel.updateTenantInfo(getTenantInfo());
if(wxCouponChannel.getCouponId() == null){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"couponId为空");
}
WxCoupon wxCoupon = wxCouponService.getById(wxCouponChannel.getCouponId(),wxCouponChannel.getTenantId());
if(wxCoupon == null || EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(wxCoupon.getStatus())){
return new ResultData(ErrorCode.COUPON_IS_EMPTY.getCode(),"此券不存在或已过期");
}
wxCouponChannel.setMakeMerchantId(wxCoupon.getMakeMerchantId());

ResultData resultData = wxCouponChannelService.saveOrUpdate(wxCouponChannel);
WxCouponChannel couponChannel = (WxCouponChannel)resultData.data;


+ 2
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxCouponChannel.java Просмотреть файл

@@ -41,6 +41,8 @@ public class WxCouponChannel extends TenantEntity {

@io.swagger.annotations.ApiModelProperty(value="卡券id",name="couponId")
private Long couponId;
@io.swagger.annotations.ApiModelProperty(value="直连收款门店",name="makeMerchantId")
private Long makeMerchantId;

@io.swagger.annotations.ApiModelProperty(value="券类型(1.满减券,2.代金券,3.团购券,4.礼品券,5.停车券)",name="type")
private Integer type;


+ 1
- 0
mallinkService/src/main/java/com/iformall/service/impl/TtCouponGoodsServiceImpl.java Просмотреть файл

@@ -202,6 +202,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService {
wxCouponChannel.setEndTime(coupon.getValidEndDate());
wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_BEFORE.getCode());
wxCouponChannel.setCouponId(coupon.getId());
wxCouponChannel.setMakeMerchantId(coupon.getMakeMerchantId());
wxCouponChannel.setType(coupon.getType());
wxCouponChannel.setTargetAd(EnumCouponChannelType.COUPON_CHANNEL_ID_DOUYIN_LIST.getCode());
wxCouponChannel.setBusiness(coupon.getBusiness());


+ 1
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCampaignServiceImpl.java Просмотреть файл

@@ -325,6 +325,7 @@ public class WxCampaignServiceImpl implements WxCampaignService {
wxCouponChannel.setEndTime(endTime);
wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode());
wxCouponChannel.setCouponId(couponId);
wxCouponChannel.setMakeMerchantId(wxCoupon.getMakeMerchantId());
wxCouponChannel.setType(wxCoupon.getType());
wxCouponChannel.setTargetAd(EnumCouponChannelType.COUPON_CHANNEL_ID_CAMPAIN.getCode());
wxCouponChannel.updateTenantInfo(wxCoupon);


+ 1
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java Просмотреть файл

@@ -639,6 +639,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode());
wxCouponChannel.setBeginTime(beginTime);
wxCouponChannel.setCouponId(couponid);
wxCouponChannel.setMakeMerchantId(wxCoupon.getMakeMerchantId());
wxCouponChannel.setType(wxCoupon.getType());
wxCouponChannel.setTargetAd(channelId);
wxCouponChannel.updateTenantInfo(tenantEntity);


+ 1
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxGameServiceImpl.java Просмотреть файл

@@ -392,6 +392,7 @@ public class WxGameServiceImpl implements WxGameService {
wxCouponChannel.setEndTime(record.getValidEndDate());
wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode());
wxCouponChannel.setCouponId(couponId);
wxCouponChannel.setMakeMerchantId(wxCoupon.getMakeMerchantId());
wxCouponChannel.setType(wxCoupon.getType());
wxCouponChannel.setTargetAd(EnumCouponChannelType.COUPON_CHANNEL_ID_GAME.getCode());
wxCouponChannel.updateTenantInfo(wxCoupon);


+ 2
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxTopicServiceImpl.java Просмотреть файл

@@ -157,7 +157,8 @@ public class WxTopicServiceImpl implements WxTopicService {
wxCouponChannel.setId(idWorker.nextId());
wxCouponChannel.setBeginTime(record.getBeginTime());
wxCouponChannel.setEndTime(record.getEndTime());
wxCouponChannel.setCouponId(Long.parseLong(couponArray[1]));
wxCouponChannel.setCouponId(wxCoupon.getId());
wxCouponChannel.setMakeMerchantId(wxCoupon.getMakeMerchantId());
wxCouponChannel.setSubTargetId(record.getId());
wxCouponChannel.updateTenantInfo(record);
wxCouponChannel.setTitle(wxCoupon.getTitle());


+ 3
- 2
mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml Просмотреть файл

@@ -6,6 +6,7 @@
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
<result column="coupon_id" jdbcType="BIGINT" property="couponId" />
<result column="make_merchant_id" jdbcType="BIGINT" property="makeMerchantId" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="target_ad" jdbcType="INTEGER" property="targetAd" />
@@ -26,7 +27,7 @@
</resultMap>

<sql id="allColumns">
distinct cc.`id`,cc.`tenant_id`,cc.`parent_tenant_id`,cc.`coupon_id`,cc.`coupon_status`,cc.`type`,cc.`title`,cc.`target_ad`,cc.`business`,cc.`sub_business`,cc.`show_begin_time`,cc.`begin_time`,cc.`end_time`,cc.`status`,cc.`create_date`,cc.`update_date`,cc.`sub_target_id`,cc.`qr_code`,
distinct cc.`id`,cc.`tenant_id`,cc.`parent_tenant_id`,cc.`coupon_id`,cc.`make_merchant_id`,cc.`coupon_status`,cc.`type`,cc.`title`,cc.`target_ad`,cc.`business`,cc.`sub_business`,cc.`show_begin_time`,cc.`begin_time`,cc.`end_time`,cc.`status`,cc.`create_date`,cc.`update_date`,cc.`sub_target_id`,cc.`qr_code`,
cc.`tt_qr_code`,cc.`tt_spu_id`,cc.`channel_price`,cc.`channel_stock`
</sql>

@@ -175,7 +176,7 @@

<select id="findVoDetail" parameterType="java.util.HashMap" resultMap="BaseResultMap">
select
cc.id,cc.coupon_id,cc.target_ad,cc.begin_time,cc.end_time,cc.tenant_id,cc.parent_tenant_id,cc.qr_code,cc.tt_qr_code,
cc.id,cc.coupon_id,cc.make_merchant_id,cc.target_ad,cc.begin_time,cc.end_time,cc.tenant_id,cc.parent_tenant_id,cc.qr_code,cc.tt_qr_code,
cc.channel_price,cc.channel_stock
from wx_coupon_channel cc where cc.id = #{id} and cc.tenant_id = #{tenantId}
</select>


Загрузка…
Отмена
Сохранить