|
|
@ -32,9 +32,7 @@ import au.com.royalpay.payment.core.beans.MerchantApplicationResult;
|
|
|
|
import au.com.royalpay.payment.core.exceptions.EmailException;
|
|
|
|
import au.com.royalpay.payment.core.exceptions.EmailException;
|
|
|
|
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
|
|
|
|
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
|
|
|
|
import au.com.royalpay.payment.core.impls.MerchantChannelApplicationManager;
|
|
|
|
import au.com.royalpay.payment.core.impls.MerchantChannelApplicationManager;
|
|
|
|
import au.com.royalpay.payment.core.mappers.MchChannelContractDAO;
|
|
|
|
import au.com.royalpay.payment.core.mappers.*;
|
|
|
|
import au.com.royalpay.payment.core.mappers.MchChannelContractMapper;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.core.mappers.SysClientMapper;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.core.utils.OrderExpiryRuleResolver;
|
|
|
|
import au.com.royalpay.payment.core.utils.OrderExpiryRuleResolver;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper;
|
|
|
|
import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
|
|
|
|
import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
|
|
|
@ -338,6 +336,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private MchChannelContractMapper mchChannelContractMapper;
|
|
|
|
private MchChannelContractMapper mchChannelContractMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
public AlipayApsOverseasConfigMapper overseaSwitchConfigMapper;
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private SmsSender smsSender;
|
|
|
|
private SmsSender smsSender;
|
|
|
|
private static final String SOURCE_AGREE_FILE = "source_agree_file";
|
|
|
|
private static final String SOURCE_AGREE_FILE = "source_agree_file";
|
|
|
@ -602,6 +603,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
client.put("aps_config_id", apsConfig.getId());
|
|
|
|
client.put("aps_config_id", apsConfig.getId());
|
|
|
|
client.put("alipay_cn_switch", apsConfig.getAlipayCnSwitch());
|
|
|
|
client.put("alipay_cn_switch", apsConfig.getAlipayCnSwitch());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Boolean overseaSwitch= overseaSwitchConfigMapper.getOverseaSwitch(client.getInteger("client_id"));
|
|
|
|
|
|
|
|
if(overseaSwitch==null||overseaSwitch){
|
|
|
|
|
|
|
|
client.put("oversea_wallet_switch", true);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
client.put("oversea_wallet_switch", false);
|
|
|
|
|
|
|
|
}
|
|
|
|
return client;
|
|
|
|
return client;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -4973,6 +4980,35 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id"));
|
|
|
|
clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 支付宝aps海外钱包 开关
|
|
|
|
|
|
|
|
* @param manager
|
|
|
|
|
|
|
|
* @param clientMoniker
|
|
|
|
|
|
|
|
* @param enableOverseaWallet
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void switchOverseaWallet(JSONObject manager, String clientMoniker, boolean enableOverseaWallet) {
|
|
|
|
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|
|
|
|
|
if (client == null) {
|
|
|
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
checkOrgPermission(manager, client);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Boolean overseaSwitch= overseaSwitchConfigMapper.getOverseaSwitch(client.getIntValue("client_id"));
|
|
|
|
|
|
|
|
logger.info("======>overseaSwitch:{}",overseaSwitch);
|
|
|
|
|
|
|
|
if(overseaSwitch==null){
|
|
|
|
|
|
|
|
ApsOverseasConfigData data = ApsOverseasConfigData.saveData(manager.getString("manager_id"),client.getString("client_id"),enableOverseaWallet);
|
|
|
|
|
|
|
|
logger.info("=======>data:OverseasSwitch:{}",data.getOverseasSwitch());
|
|
|
|
|
|
|
|
overseaSwitchConfigMapper.save(data);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
JSONObject config=new JSONObject();
|
|
|
|
|
|
|
|
config.put("clientId", client.getString("client_id"));
|
|
|
|
|
|
|
|
config.put("modifier", manager.getString("manager_id"));
|
|
|
|
|
|
|
|
config.put("overseas_switch", enableOverseaWallet);
|
|
|
|
|
|
|
|
overseaSwitchConfigMapper.updateApsOverseasConfigByClientId(config);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void changePaymentPage(JSONObject account, String paypadVersion) {
|
|
|
|
public void changePaymentPage(JSONObject account, String paypadVersion) {
|
|
|
|
int clientId = account.getIntValue("client_id");
|
|
|
|
int clientId = account.getIntValue("client_id");
|
|
|
|