|
|
|
@ -27,25 +27,7 @@ import au.com.royalpay.payment.manage.mappers.log.LogSettleMailMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.redpack.ActClientInvitationCodeMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.risk.RiskAttentionMerchantsMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientApplyMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientAuditProcessMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientBDMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientBankAccountMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientConfigMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientDeviceMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientFilesMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientsContractMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.CommoditiesMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.MailSendMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.MailUnsubMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ManagerMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.PermissionPartnerModuleMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.SysRpayMerchantApplyMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.SysWxMerchantApplyMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.*;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.beans.ActivityPosterBuilder;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.beans.BankAccountInfo;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
|
|
|
|
@ -313,6 +295,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
private PermissionPartnerManagerImpl permissionPartnerManagerImpl;
|
|
|
|
|
@Resource
|
|
|
|
|
private RiskAttentionMerchantsMapper riskAttentionMerchantsMapper;
|
|
|
|
|
@Resource
|
|
|
|
|
private SysPaymentConfigMapper sysPaymentConfigMapper;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private SmsSender smsSender;
|
|
|
|
@ -445,6 +429,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
String yeepayQrcodeUrl = PlatformEnvironment.getEnv().concatUrl("/api/v1.0/yeepay/partners/" + client.getString("client_moniker") + "/jump/app");
|
|
|
|
|
client.put("yeepayQrcodeUrl", QRCodeUtils.qrcodeImageCode(yeepayQrcodeUrl, 250, true));
|
|
|
|
|
}
|
|
|
|
|
if (client.getString("cb_bankpay_url") != null) {
|
|
|
|
|
String cbBankPayQrcodeUrl = PlatformEnvironment.getEnv().concatUrl("/sys/partners/" + client.getString("client_moniker") + "/cb_bankpay/link");
|
|
|
|
|
client.put("cbBankPayQrcodeUrl", QRCodeUtils.qrcodeImageCode(cbBankPayQrcodeUrl, 250, true));
|
|
|
|
|
}
|
|
|
|
|
return client;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1627,6 +1615,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
checkAddRate(config, "hf", "hf_rate_value", org, "min_hf_rate");
|
|
|
|
|
checkAddRate(config, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate");
|
|
|
|
|
checkAddRate(config, "Yeepay", "yeepay_rate_value", org, "min_yeepay_rate");
|
|
|
|
|
checkAddRate(config, "CB_BankPay", "min_cb_bankpay_value", org, "min_cb_bankpay_rate");
|
|
|
|
|
|
|
|
|
|
configNewClientRate(config, clientId, "Wechat", "wechat_rate_value", org, "min_wechat_rate");
|
|
|
|
|
configNewClientRate(config, clientId, "Alipay", "alipay_rate_value", org, "min_alipay_rate");
|
|
|
|
@ -1636,6 +1625,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
configNewClientRate(config, clientId, "hf", "hf_rate_value", org, "min_hf_rate");
|
|
|
|
|
configNewClientRate(config, clientId, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate");
|
|
|
|
|
configNewClientRate(config, clientId, "Yeepay", "yeepay_rate_value", org, "min_yeepay_rate");
|
|
|
|
|
configNewClientRate(config, clientId, "CB_BankPay", "cb_bankpay_rate_value", org, "min_cb_bankpay_rate");
|
|
|
|
|
//todo 暂不更新Rpay+ 费率信息
|
|
|
|
|
rpayApi.modifySurchargeConfig(client);
|
|
|
|
|
|
|
|
|
@ -4268,6 +4258,50 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
return PageListUtils.buildPageListResult(partners);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void switchPaymentConfig(String clientMoniker, HttpServletResponse response) throws IOException {
|
|
|
|
|
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new BadRequestException("partner code is not exists!");
|
|
|
|
|
}
|
|
|
|
|
JSONObject paymentConfig = sysPaymentConfigMapper.findOne(1);
|
|
|
|
|
if (paymentConfig == null) {
|
|
|
|
|
throw new BadRequestException("服务商未开启快捷支付");
|
|
|
|
|
}
|
|
|
|
|
response.sendRedirect(String.format(PlatformEnvironment.getEnv().concatUrl(paymentConfig.getString("path")), clientMoniker));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void switchCBBankLink(JSONObject manager, String clientMoniker, boolean allow) {
|
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
|
}
|
|
|
|
|
checkOrgPermission(manager, client);
|
|
|
|
|
if (StringUtils.isEmpty(client.getString("cb_bankpay_url"))) {
|
|
|
|
|
String longUrl = PlatformEnvironment.getEnv().concatUrl("/sys/partners/" + client.getString("client_moniker") + "/cb_bankpay/link");
|
|
|
|
|
String cb_bankpay_url = getCBBankShortLink(longUrl);
|
|
|
|
|
client.put("cb_bankpay_url", cb_bankpay_url);
|
|
|
|
|
client.put("enable_cb_bankpay_link", allow);
|
|
|
|
|
clientMapper.update(client);
|
|
|
|
|
} else {
|
|
|
|
|
client.put("enable_cb_bankpay_link", allow);
|
|
|
|
|
clientMapper.update(client);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String cbBankPayLink(String clientMoniker) {
|
|
|
|
|
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new BadRequestException("partner code is not exists!");
|
|
|
|
|
}
|
|
|
|
|
JSONObject paymentConfig = sysPaymentConfigMapper.findOne(1);
|
|
|
|
|
if (paymentConfig == null) {
|
|
|
|
|
throw new BadRequestException("服务商未开启快捷支付");
|
|
|
|
|
}
|
|
|
|
|
return String.format(PlatformEnvironment.getEnv().concatUrl(paymentConfig.getString("path")), clientMoniker);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private TemplateMessage initClientMessage(JSONObject client, String newExpiryDate, String wechatOpenid, String templateId) {
|
|
|
|
|
TemplateMessage notice = new TemplateMessage(wechatOpenid, templateId, null);
|
|
|
|
@ -4292,4 +4326,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
}).start();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String getCBBankShortLink(String longUrl) {
|
|
|
|
|
MpWechatApi api = mpWechatApiProvider.getNewPaymentApi();
|
|
|
|
|
return api.registerShortUrl(longUrl);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|