|
|
|
@@ -2,6 +2,7 @@ package com.iformall.service.impl; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
@@ -562,6 +563,15 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { |
|
|
|
@Override |
|
|
|
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) |
|
|
|
public void subsidyAfterVerify(WxCouponOrder couponOrder, Long merchantId) { |
|
|
|
// 检查补贴是否入库 |
|
|
|
List<WxMerchantSubsidy> wmsList = wxMerchantSubsidyMapper.selectList( |
|
|
|
new LambdaQueryWrapper<WxMerchantSubsidy>().eq(WxMerchantSubsidy::getOrderId, couponOrder.getOrderId()) |
|
|
|
.eq(WxMerchantSubsidy::getType, EnumMerchantSubsidyType.MANUAL) |
|
|
|
); |
|
|
|
if (wmsList.size() > 0) { |
|
|
|
logger.error("补贴已经入库: (orderId,type)-({},1)", couponOrder.getOrderId()); |
|
|
|
return; |
|
|
|
} |
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
|
|
|
|
WxCouponMerchant couponMerchantQ = new WxCouponMerchant(); |
|
|
|
|