定时任务 修改进件信息处理
This commit is contained in:
@@ -2,6 +2,7 @@ package com.czg.task;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.czg.EntryManager;
|
import com.czg.EntryManager;
|
||||||
import com.czg.PayCst;
|
import com.czg.PayCst;
|
||||||
import com.czg.constant.PayChannelCst;
|
import com.czg.constant.PayChannelCst;
|
||||||
@@ -9,12 +10,12 @@ import com.czg.dto.resp.QueryStatusResp;
|
|||||||
import com.czg.order.dto.ShopMerchantDTO;
|
import com.czg.order.dto.ShopMerchantDTO;
|
||||||
import com.czg.order.entity.ShopDirectMerchant;
|
import com.czg.order.entity.ShopDirectMerchant;
|
||||||
import com.czg.order.service.ShopMerchantService;
|
import com.czg.order.service.ShopMerchantService;
|
||||||
|
import com.czg.pay.AlipayAuthInfoDto;
|
||||||
import com.czg.pay.NativeMerchantDTO;
|
import com.czg.pay.NativeMerchantDTO;
|
||||||
import com.czg.service.order.service.ShopDirectMerchantService;
|
import com.czg.service.order.service.ShopDirectMerchantService;
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.dubbo.config.annotation.DubboReference;
|
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@@ -86,7 +87,10 @@ public class EntryManagerTask {
|
|||||||
NativeMerchantDTO nativeMerchantDTO = new NativeMerchantDTO();
|
NativeMerchantDTO nativeMerchantDTO = new NativeMerchantDTO();
|
||||||
nativeMerchantDTO.setWechatMerchantId(wechatMerchantId);
|
nativeMerchantDTO.setWechatMerchantId(wechatMerchantId);
|
||||||
nativeMerchantDTO.setAlipayMerchantId(alipayMerchantId);
|
nativeMerchantDTO.setAlipayMerchantId(alipayMerchantId);
|
||||||
shopMerchantDTO.setNativeMerchantDTO(nativeMerchantDTO);
|
if (StrUtil.isNotBlank(shopDirectMerchant.getAlipayAuthInfo())) {
|
||||||
|
AlipayAuthInfoDto alipayAuthInfoDto = JSONObject.parseObject(shopDirectMerchant.getAlipayAuthInfo(), AlipayAuthInfoDto.class);
|
||||||
|
nativeMerchantDTO.setAlipayAuthInfo(alipayAuthInfoDto);
|
||||||
|
}
|
||||||
shopMerchantDTO.setNativeMerchantDTO(nativeMerchantDTO);
|
shopMerchantDTO.setNativeMerchantDTO(nativeMerchantDTO);
|
||||||
shopMerchantService.editEntry(shopMerchantDTO, false);
|
shopMerchantService.editEntry(shopMerchantDTO, false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,6 +103,15 @@ public class ShopMerchantServiceImpl extends ServiceImpl<ShopMerchantMapper, Sho
|
|||||||
shopMerchant.setNativePayJson(JSONObject.toJSONString(shopMerchantParam.getNativeMerchantDTO()));
|
shopMerchant.setNativePayJson(JSONObject.toJSONString(shopMerchantParam.getNativeMerchantDTO()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (PayChannelCst.NATIVE.equals(shopMerchantParam.getChannel())) {
|
||||||
|
if (StrUtil.isNotBlank(shopMerchant.getRelatedLicenceNo()) && (StrUtil.isNotBlank(shopMerchant.getAlipayAppId()) || StrUtil.isNotBlank(shopMerchant.getWechatAppId()))) {
|
||||||
|
ShopMerchant upShopMerchant = new ShopMerchant();
|
||||||
|
upShopMerchant.setAlipayAppId(shopMerchant.getAlipayAppId());
|
||||||
|
upShopMerchant.setWechatAppId(shopMerchant.getWechatAppId());
|
||||||
|
upShopMerchant.setNativePayJson(JSONObject.toJSONString(shopMerchantParam.getNativeMerchantDTO()));
|
||||||
|
update(upShopMerchant, query().eq(ShopMerchant::getRelatedLicenceNo, shopMerchantParam.getRelatedLicenceNo()));
|
||||||
|
}
|
||||||
|
}
|
||||||
return saveOrUpdate(shopMerchant);
|
return saveOrUpdate(shopMerchant);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user