Browse Source

//coupon

release_toaliyun_real
xhxu 3 years ago
parent
commit
c171ecbfe6
2 changed files with 1 additions and 11 deletions
  1. +0
    -10
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java
  2. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java

+ 0
- 10
mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java View File

@@ -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());


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java View File

@@ -448,6 +448,7 @@ public class WxCouponServiceImpl implements WxCouponService {

final IdWorker idWorker = IdWorker.get();
if (record.getId() == null) {
record.setId(idWorker.nextId());

List<WxCouponMerchantDto> 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);


Loading…
Cancel
Save