yangkai 6 years ago
parent 7b1464b547
commit cde5094995

@ -376,4 +376,6 @@ public interface ClientManager {
void switchCBBankLink(JSONObject manager, String clientMoniker, boolean allow);
String cbBankPayLink(String clientMoniker);
void switchPaymentConfigPC(String clientMoniker, HttpServletResponse response) throws IOException;
}

@ -4280,7 +4280,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
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 longUrl = PlatformEnvironment.getEnv().concatUrl("/sys/partners/" + client.getString("client_moniker") + "/cb_bankpay/link/pc");
String cb_bankpay_url = getCBBankShortLink(longUrl);
client.put("cb_bankpay_url", cb_bankpay_url);
client.put("enable_cb_bankpay_link", allow);
@ -4304,6 +4304,21 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return String.format(PlatformEnvironment.getEnv().concatUrl(paymentConfig.getString("path")), clientMoniker);
}
@Override
public void switchPaymentConfigPC(String clientMoniker, HttpServletResponse response) throws IOException {
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
throw new BadRequestException("partner code is not exists!");
}
JSONObject paymentConfig = sysChannelConfigMapper.findOne(1);
if (paymentConfig == null) {
throw new BadRequestException("服务商未开启快捷支付");
}
String path = paymentConfig.getString("path");
path = path.replaceAll("app","pc");
response.sendRedirect(String.format(PlatformEnvironment.getEnv().concatUrl(path), clientMoniker));
}
private TemplateMessage initClientMessage(JSONObject client, String newExpiryDate, String wechatOpenid, String templateId) {
TemplateMessage notice = new TemplateMessage(wechatOpenid, templateId, null);
notice.put("first", "您好您的合同费率已到期根据合同协议系统已自动为您延期1年。", "#ff0000");

@ -636,4 +636,9 @@ public class PartnerManageController {
public String jumpCBBankPayLink(@PathVariable String clientMoniker) {
return clientManager.cbBankPayLink(clientMoniker);
}
@RequestMapping(value = "/{clientMoniker}/cb_bankpay/link/pc", method = RequestMethod.GET)
public void switchPaymentWayPC(@PathVariable String clientMoniker, HttpServletResponse response) throws IOException {
clientManager.switchPaymentConfigPC(clientMoniker, response);
}
}

Loading…
Cancel
Save