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