From d48d4393d1197d5763bc557eb208ca785d22d315 Mon Sep 17 00:00:00 2001 From: eason Date: Wed, 27 Jun 2018 15:30:18 +0800 Subject: [PATCH] short url --- .../payment/manage/merchants/core/ClientManager.java | 1 + .../manage/merchants/core/impls/ClientManagerImpl.java | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java index 28b1d03c2..efbba73e0 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java @@ -319,4 +319,5 @@ public interface ClientManager { void removeSub(String client_moniker, JSONObject manager); + String getShortLink(String client_moniker); } diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index a47653f6c..59268e5e0 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -3663,4 +3663,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } mailService.removeUnsub(sub.getLong("id")); } + + @Override + public String getShortLink(String client_moniker){ + String longUrl = PlatformEnvironment.getEnv().concatUrl("/api/v1.0/hf_gateway/partners/"+client_moniker+"/jump"); + MpWechatApi api = mpWechatApiProvider.getNewPaymentApi(); + return api.registerShortUrl(longUrl); + } }