定时任务 修改进件信息处理
This commit is contained in:
@@ -93,6 +93,7 @@ public class EntryManagerTask {
|
||||
}
|
||||
shopMerchantDTO.setNativeMerchantDTO(nativeMerchantDTO);
|
||||
shopMerchantService.editEntry(shopMerchantDTO, false);
|
||||
shopMerchantService.upMerchant(licenceNo, nativeMerchantDTO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,10 @@ package com.czg.order.service;
|
||||
import com.czg.order.dto.ShopMerchantDTO;
|
||||
import com.czg.order.entity.ShopDirectMerchant;
|
||||
import com.czg.order.entity.ShopMerchant;
|
||||
import com.czg.pay.NativeMerchantDTO;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -22,6 +25,13 @@ public interface ShopMerchantService extends IService<ShopMerchant> {
|
||||
*/
|
||||
Boolean editEntry(ShopMerchantDTO shopMerchantParam, boolean isUp);
|
||||
|
||||
|
||||
/**
|
||||
* 已绑定的支付
|
||||
* 更新商户支付参数
|
||||
*/
|
||||
void upMerchant(@NotBlank String relatedLicenceNo, @NotNull NativeMerchantDTO nativeMerchantDTO);
|
||||
|
||||
@Override
|
||||
ShopMerchant getById(Serializable id);
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@ import com.czg.service.order.service.ShopDirectMerchantService;
|
||||
import com.czg.utils.AssertUtil;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
@@ -103,18 +105,19 @@ public class ShopMerchantServiceImpl extends ServiceImpl<ShopMerchantMapper, Sho
|
||||
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);
|
||||
}
|
||||
|
||||
@Override
|
||||
@CacheEvict(allEntries = true)
|
||||
public void upMerchant(@NotBlank String relatedLicenceNo, @NotNull NativeMerchantDTO nativeMerchantDTO) {
|
||||
ShopMerchant upShopMerchant = new ShopMerchant();
|
||||
upShopMerchant.setAlipayAppId(nativeMerchantDTO.getAlipayMerchantId());
|
||||
upShopMerchant.setWechatAppId(nativeMerchantDTO.getWechatMerchantId());
|
||||
upShopMerchant.setNativePayJson(JSONObject.toJSONString(nativeMerchantDTO));
|
||||
update(upShopMerchant, query().eq(ShopMerchant::getRelatedLicenceNo, relatedLicenceNo));
|
||||
}
|
||||
|
||||
@Cacheable(key = "#id")
|
||||
@Override
|
||||
public ShopMerchant getById(Serializable id) {
|
||||
|
||||
Reference in New Issue
Block a user