From c171ecbfe6ae563e155ab829b0ea94ed67d95278 Mon Sep 17 00:00:00 2001 From: xhxu Date: Mon, 26 Sep 2022 18:18:07 +0800 Subject: [PATCH] //coupon --- .../iformall/controller/market/WxCouponController.java | 10 ---------- .../com/iformall/service/impl/WxCouponServiceImpl.java | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java index fcf887619..f34d04a52 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java @@ -241,16 +241,6 @@ public class WxCouponController extends BaseController { } wxCoupon.updateTenantInfo(getTenantInfo()); - if(EnumDelFlag.YES.getCode().equals(wxCoupon.getIsDel())){ - WxCouponChannel query = new WxCouponChannel(); - query.updateTenantInfo(wxCoupon); - query.setCouponId(wxCoupon.getId()); - query.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); - if (CollectionUtils.isNotEmpty(wxCouponChannelService.findList(query))) { - return new ResultData(ResultData.ERROR, "有活动正在上架,请先下架。"); - } - } - WxCoupon coupon = wxCouponService.getById(wxCoupon.getId(),wxCoupon.getTenantId()); if (null == coupon) { return new ResultData(ResultData.ERROR, "券未查询到。"+wxCoupon.getId()); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java index 5aa2a9540..255fe2c23 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java @@ -448,6 +448,7 @@ public class WxCouponServiceImpl implements WxCouponService { final IdWorker idWorker = IdWorker.get(); if (record.getId() == null) { + record.setId(idWorker.nextId()); List wxCouponMerchantDtoList = new ArrayList<>(); merchantParamList.forEach(merchantParam -> { @@ -479,7 +480,6 @@ public class WxCouponServiceImpl implements WxCouponService { couponPasswordService.mkPasswords(record, record.getId(), record.getInventory()); } - record.setId(idWorker.nextId()); record.setCreateDate(new Date()); record.setUpdateDate(new Date()); wxCouponMapper.insert(record);