|
|
|
@ -4314,6 +4314,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
if (paymentConfig == null) {
|
|
|
|
|
throw new BadRequestException("服务商未开启快捷支付");
|
|
|
|
|
}
|
|
|
|
|
if (client.getString("cb_channel_id") != null) {
|
|
|
|
|
JSONObject channelConfig = sysChannelConfigMapper.selectByChannelId(client.getString("cb_channel_id"));
|
|
|
|
|
if (channelConfig != null) {
|
|
|
|
|
paymentConfig = channelConfig;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
response.sendRedirect(String.format(PlatformEnvironment.getEnv().concatUrl(paymentConfig.getString("path")), clientMoniker));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -4346,6 +4352,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
if (paymentConfig == null) {
|
|
|
|
|
throw new BadRequestException("服务商未开启快捷支付");
|
|
|
|
|
}
|
|
|
|
|
if (client.getString("cb_channel_id") != null) {
|
|
|
|
|
JSONObject channelConfig = sysChannelConfigMapper.selectByChannelId(client.getString("cb_channel_id"));
|
|
|
|
|
if (channelConfig != null) {
|
|
|
|
|
paymentConfig = channelConfig;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return String.format(PlatformEnvironment.getEnv().concatUrl(paymentConfig.getString("path")), clientMoniker);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -4359,11 +4371,35 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
if (paymentConfig == null) {
|
|
|
|
|
throw new BadRequestException("服务商未开启快捷支付");
|
|
|
|
|
}
|
|
|
|
|
if (client.getString("cb_channel_id") != null) {
|
|
|
|
|
JSONObject channelConfig = sysChannelConfigMapper.selectByChannelId(client.getString("cb_channel_id"));
|
|
|
|
|
if (channelConfig != null) {
|
|
|
|
|
paymentConfig = channelConfig;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
String path = paymentConfig.getString("path");
|
|
|
|
|
path = path.replaceAll("app","pc");
|
|
|
|
|
response.sendRedirect(String.format(PlatformEnvironment.getEnv().concatUrl(path), clientMoniker));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void partnerCBChannelConfig(String clientMoniker, String channelKey, String channel_id) {
|
|
|
|
|
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new BadRequestException("partner code is not exists!");
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isNotEmpty(channel_id)) {
|
|
|
|
|
JSONObject cbBankConfig = sysChannelConfigMapper.selectByChannelId(channel_id);
|
|
|
|
|
if (cbBankConfig == null) {
|
|
|
|
|
throw new BadRequestException("不存在该支付渠道");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
JSONObject updateClient = new JSONObject();
|
|
|
|
|
updateClient.put("client_id", client.getIntValue("client_id"));
|
|
|
|
|
updateClient.put(channelKey, channel_id);
|
|
|
|
|
clientMapper.update(updateClient);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private TemplateMessage initClientMessage(JSONObject client, String newExpiryDate, String wechatOpenid, String templateId) {
|
|
|
|
|
TemplateMessage notice = new TemplateMessage(wechatOpenid, templateId, null);
|
|
|
|
|
notice.put("first", "您好,您的合同费率已到期,根据合同协议系统已自动为您延期1年。", "#ff0000");
|
|
|
|
|