|
|
|
@ -103,7 +103,6 @@ import org.springframework.util.CollectionUtils;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
import org.thymeleaf.context.Context;
|
|
|
|
|
import org.thymeleaf.spring4.SpringTemplateEngine;
|
|
|
|
|
import sun.misc.BASE64Encoder;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
@ -416,8 +415,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
}
|
|
|
|
|
//商户支付场景
|
|
|
|
|
if (StringUtils.isNotBlank(client.getString("client_pay_type"))) {
|
|
|
|
|
client.put("client_pay_type",client.getString("client_pay_type").split(","));
|
|
|
|
|
client.put("client_pay_desc",client.getString("client_pay_desc").split(","));
|
|
|
|
|
client.put("client_pay_type", client.getString("client_pay_type").split(","));
|
|
|
|
|
client.put("client_pay_desc", client.getString("client_pay_desc").split(","));
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isNotBlank(client.getString("parent_client_id"))
|
|
|
|
|
&& sysClientMapper.childClientId(client.getIntValue("client_id")).size() > 0) {
|
|
|
|
@ -427,7 +426,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
JSONObject partnerGatewaySign = merchantSignInfoMapper.findClientSign(client.getString("client_moniker"));
|
|
|
|
|
if (partnerGatewaySign == null) {
|
|
|
|
|
client.put("enable_gateway_version2", false);
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
client.put("enable_gateway_version2", partnerGatewaySign.getBooleanValue("is_valid"));
|
|
|
|
|
client.put("gateway_sign", partnerGatewaySign);
|
|
|
|
|
}
|
|
|
|
@ -525,7 +524,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
int authDays = PlatformEnvironment.getEnv().authDays();// 快速自助开通申请有效期
|
|
|
|
|
for (JSONObject partner : partners) {
|
|
|
|
|
String subMerchantId = partner.getString("sub_merchant_id");
|
|
|
|
|
if (subMerchantId != null ) {
|
|
|
|
|
if (subMerchantId != null) {
|
|
|
|
|
partner.put("temp_sub_merchant", checkSubMerchantIdInCommonPool(subMerchantId));
|
|
|
|
|
}
|
|
|
|
|
if (partner.getIntValue("approve_result") == 2) {
|
|
|
|
@ -1818,7 +1817,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
List<JSONObject> clients = clientMapper.listChildClients(partner.getIntValue("client_id"));
|
|
|
|
|
if (clients.size() > 0) {
|
|
|
|
|
partner.put("level3Clients", clients);
|
|
|
|
|
clients.forEach(e->{
|
|
|
|
|
clients.forEach(e -> {
|
|
|
|
|
e.put("parent_client_moniker", partner.getString("client_moniker"));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -1903,7 +1902,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
JSONObject clientInfo = getClientInfo(Integer.parseInt(currentClientId));
|
|
|
|
|
if (clientInfo.containsKey("parent_client_id")) {
|
|
|
|
|
int parentClientId = clientInfo.getIntValue("parent_client_id");
|
|
|
|
|
if (parentClientId != client_id && client_id!= Integer.parseInt(currentClientId) && !listLevel3Client(client_id).contains(parentClientId)) {
|
|
|
|
|
if (parentClientId != client_id && client_id != Integer.parseInt(currentClientId) && !listLevel3Client(client_id).contains(parentClientId)) {
|
|
|
|
|
throw new Exception("partner has no permission");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -3272,7 +3271,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
gatewaySignInfo.put("last_update_date", new Date());
|
|
|
|
|
merchantSignInfoMapper.insert(gatewaySignInfo);
|
|
|
|
|
}
|
|
|
|
|
clientModifySupport.processClientGatewaySignModify(new SwitchGatewaySignPermissionModify(account, client.getString("client_moniker"),"is_valid" ,enable_gateway_v2));
|
|
|
|
|
clientModifySupport.processClientGatewaySignModify(new SwitchGatewaySignPermissionModify(account, client.getString("client_moniker"), "is_valid", enable_gateway_v2));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -3282,7 +3281,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
|
}
|
|
|
|
|
clientModifySupport.processClientGatewaySignModify(new SwitchGatewaySignPermissionModify(account, client.getString("client_moniker"),"verify_ip" ,verify_ip));
|
|
|
|
|
clientModifySupport.processClientGatewaySignModify(new SwitchGatewaySignPermissionModify(account, client.getString("client_moniker"), "verify_ip", verify_ip));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -3293,7 +3292,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isNotBlank(ipWhitelistConfig)) {
|
|
|
|
|
clientModifySupport.processClientGatewaySignModify(new GatewayInfoModify(account, client.getString("client_moniker"),"ip_whitelist", ipWhitelistConfig, "重新设置IP白名单"));
|
|
|
|
|
clientModifySupport.processClientGatewaySignModify(new GatewayInfoModify(account, client.getString("client_moniker"), "ip_whitelist", ipWhitelistConfig, "重新设置IP白名单"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3306,8 +3305,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
|
}
|
|
|
|
|
JSONObject key = getRsaKey();
|
|
|
|
|
clientModifySupport.processClientGatewaySignModify(new GatewayInfoModify(account, client.getString("client_moniker"),"platform_public_key",key.getString("public_key"),"重新生成平台公钥"));
|
|
|
|
|
clientModifySupport.processClientGatewaySignModify(new GatewayInfoModify(account, client.getString("client_moniker"),"platform_private_key",key.getString("private_key"),"重新生成平台私钥"));
|
|
|
|
|
clientModifySupport.processClientGatewaySignModify(new GatewayInfoModify(account, client.getString("client_moniker"), "platform_public_key", key.getString("public_key"), "重新生成平台公钥"));
|
|
|
|
|
clientModifySupport.processClientGatewaySignModify(new GatewayInfoModify(account, client.getString("client_moniker"), "platform_private_key", key.getString("private_key"), "重新生成平台私钥"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -3648,7 +3647,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
|
}
|
|
|
|
|
return clearingDistributedSurchargeMapper.findSurchargeTransactionsByDetailId(client.getIntValue("client_id"),detailId);
|
|
|
|
|
return clearingDistributedSurchargeMapper.findSurchargeTransactionsByDetailId(client.getIntValue("client_id"), detailId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -4177,27 +4176,27 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
queryGMSJson.put("partner", mch.getPid());
|
|
|
|
|
queryGMSJson.put("sign_type", "MD5");
|
|
|
|
|
queryGMSJson.put("_input_charset", "utf-8");
|
|
|
|
|
queryGMSJson.put("timestamp", DateFormatUtils.format(System.currentTimeMillis(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
queryGMSJson.put("timestamp", DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
queryGMSJson.put("secondary_merchant_name", client.getString("company_name"));
|
|
|
|
|
queryGMSJson.put("secondary_merchant_id", client.getString("client_moniker"));
|
|
|
|
|
queryGMSJson.put("store_id", client.getString("client_moniker"));
|
|
|
|
|
queryGMSJson.put("store_name", client.getString("short_name"));
|
|
|
|
|
queryGMSJson.put("store_country", client.getString("country").substring(0,2));
|
|
|
|
|
queryGMSJson.put("store_address", client.getString("country") + " "+client.getString("state") + " "+client.getString("suburb") + " "+client.getString("address"));
|
|
|
|
|
queryGMSJson.put("store_country", client.getString("country").substring(0, 2));
|
|
|
|
|
queryGMSJson.put("store_address", client.getString("country") + " " + client.getString("state") + " " + client.getString("suburb") + " " + client.getString("address"));
|
|
|
|
|
queryGMSJson.put("store_industry", client.getString("alipayindustry"));
|
|
|
|
|
queryGMSJson.put("internal_store_photo", client.getString("company_photo"));
|
|
|
|
|
queryGMSJson.put("external_storefront_photo", client.getString("store_photo"));
|
|
|
|
|
queryGMSJson.put("register_country", client.getString("country").substring(0,2));
|
|
|
|
|
queryGMSJson.put("register_address", client.getString("country") + " "+client.getString("state") + " "+client.getString("suburb") + " "+client.getString("address"));
|
|
|
|
|
queryGMSJson.put("register_country", client.getString("country").substring(0, 2));
|
|
|
|
|
queryGMSJson.put("register_address", client.getString("country") + " " + client.getString("state") + " " + client.getString("suburb") + " " + client.getString("address"));
|
|
|
|
|
if ("Company".equals(client.getString("business_structure"))) {
|
|
|
|
|
queryGMSJson.put("secondary_merchant_type", "ENTERPRISE");
|
|
|
|
|
queryGMSJson.put("registration_no", client.getString("acn"));
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
queryGMSJson.put("secondary_merchant_type", "INDIVIDUAL");
|
|
|
|
|
queryGMSJson.put("representative_name", client.getString("contact_person"));
|
|
|
|
|
}
|
|
|
|
|
queryGMSJson.put("contact_no",client.getString("contact_phone"));
|
|
|
|
|
queryGMSJson.put("contact_email",client.getString("contact_email"));
|
|
|
|
|
queryGMSJson.put("contact_no", client.getString("contact_phone"));
|
|
|
|
|
queryGMSJson.put("contact_email", client.getString("contact_email"));
|
|
|
|
|
return queryGMSJson;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -4214,12 +4213,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
queryGMSJson.put("partner", mch.getPid());
|
|
|
|
|
queryGMSJson.put("sign_type", "MD5");
|
|
|
|
|
queryGMSJson.put("_input_charset", "utf-8");
|
|
|
|
|
queryGMSJson.put("timestamp", DateFormatUtils.format(System.currentTimeMillis(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
queryGMSJson.put("timestamp", DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
queryGMSJson.put("secondary_merchant_name", client.getString("company_name"));
|
|
|
|
|
queryGMSJson.put("secondary_merchant_id", client.getString("client_moniker"));
|
|
|
|
|
queryGMSJson.put("secondary_merchant_industry", client.getString("alipayindustry"));
|
|
|
|
|
queryGMSJson.put("register_country", client.getString("country").substring(0,2));
|
|
|
|
|
queryGMSJson.put("register_address", client.getString("country") + " "+client.getString("state") + " "+client.getString("suburb") + " "+client.getString("address"));
|
|
|
|
|
queryGMSJson.put("register_country", client.getString("country").substring(0, 2));
|
|
|
|
|
queryGMSJson.put("register_address", client.getString("country") + " " + client.getString("state") + " " + client.getString("suburb") + " " + client.getString("address"));
|
|
|
|
|
JSONObject website = new JSONObject();
|
|
|
|
|
List<JSONObject> websites = new ArrayList<>();
|
|
|
|
|
website.put("site_type", "WEB");
|
|
|
|
@ -4231,12 +4230,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
queryGMSJson.put("secondary_merchant_type", "ENTERPRISE");
|
|
|
|
|
queryGMSJson.put("registration_no", client.getString("acn"));
|
|
|
|
|
queryGMSJson.put("shareholder_name", client.getString("contact_person"));
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
queryGMSJson.put("secondary_merchant_type", "INDIVIDUAL");
|
|
|
|
|
queryGMSJson.put("representative_name", client.getString("contact_person"));
|
|
|
|
|
}
|
|
|
|
|
queryGMSJson.put("contact_no",client.getString("contact_phone"));
|
|
|
|
|
queryGMSJson.put("contact_email",client.getString("contact_email"));
|
|
|
|
|
queryGMSJson.put("contact_no", client.getString("contact_phone"));
|
|
|
|
|
queryGMSJson.put("contact_email", client.getString("contact_email"));
|
|
|
|
|
return queryGMSJson;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -4855,7 +4854,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
needCheckParams.put("bank_account_no", bankAccount.getString("account_no"));
|
|
|
|
|
}
|
|
|
|
|
List<JSONObject> listRiskySimilarMerchants = riskAttentionMerchantsMapper.listRiskySimilarMerchants(needCheckParams);
|
|
|
|
|
if (listRiskySimilarMerchants.size() > 0) {
|
|
|
|
|
if (!listRiskySimilarMerchants.isEmpty()) {
|
|
|
|
|
StringBuilder appendStr = new StringBuilder();
|
|
|
|
|
StringBuilder infoStr = new StringBuilder();
|
|
|
|
|
|
|
|
|
@ -5112,7 +5111,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
List<JSONObject> sendAccounts = new ArrayList<>();
|
|
|
|
|
needNotifyUsers.forEach(userOpenId -> {
|
|
|
|
|
try {
|
|
|
|
|
accounts.forEach(account ->{
|
|
|
|
|
accounts.forEach(account -> {
|
|
|
|
|
JSONObject params = new JSONObject();
|
|
|
|
|
params.put("client_moniker", account.getString("client_moniker"));
|
|
|
|
|
params.put("role", account.getIntValue("role"));
|
|
|
|
@ -5173,8 +5172,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
KeyPair keyPairGen = RSACrypt.generateKeyPairs();
|
|
|
|
|
RSAPublicKey publicKey = (RSAPublicKey) keyPairGen.getPublic();
|
|
|
|
|
RSAPrivateKey privateKey = (RSAPrivateKey) keyPairGen.getPrivate();
|
|
|
|
|
key.put("public_key", new BASE64Encoder().encode(publicKey.getEncoded()));
|
|
|
|
|
key.put("private_key", new BASE64Encoder().encode(privateKey.getEncoded()));
|
|
|
|
|
key.put("public_key", Base64.encodeBase64String(publicKey.getEncoded()));
|
|
|
|
|
key.put("private_key", Base64.encodeBase64String(privateKey.getEncoded()));
|
|
|
|
|
return key;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|