From a31f127c2629741d12db29580caf8baa8304e022 Mon Sep 17 00:00:00 2001 From: luoyang Date: Thu, 20 Feb 2020 13:45:28 +0800 Subject: [PATCH] =?UTF-8?q?add=20App=E6=89=AB=E7=A0=81=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E5=8D=95=E7=82=B9=E7=99=BB=E5=BD=95=E8=B7=A8=E5=A2=83=E5=95=86?= =?UTF-8?q?=E5=9F=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../appclient/core/impls/RetailAppServiceImp.java | 15 +++++++++++++-- .../mappers/system/ClientIncrementalMapper.java | 3 ++- .../mappers/system/ClientServicesApplyMapper.java | 3 ++- src/main/ui/login.html | 14 +++++++++++++- src/main/ui/login_v1.html | 14 +++++++++++++- 6 files changed, 44 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 8c8d440ef..b3637d803 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.3.49 + 1.3.50 UTF-8 1.8.0 diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java index eac79d1fe..7bdfa750d 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java @@ -227,6 +227,10 @@ public class RetailAppServiceImp implements RetailAppService { @Resource private RetailAppService retailAppService; @Resource + private ClientIncrementalMapper clientIncrementalMapper; + @Resource + private ClientServicesApplyMapper clientServicesApplyMapper; + @Resource private DeviceManager deviceManager; private final String CBBANK_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2019/08/05/1564972204689_uwZvpTBjtLUMcN8c540xcZvux1Rd3O.pdf"; private final String IMG_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2019/10/22/1571723034726_5xK6A0FGv5aQPbMIDJzXJrUPKHFutv.pdf"; @@ -1590,9 +1594,16 @@ public class RetailAppServiceImp implements RetailAppService { JSONObject act = new JSONObject(); act.put("data", latestAct); act.put("type", "act"); - result.add(act); + if (StringUtils.equalsIgnoreCase("跨境商城", latestAct.getString("act_name"))) { + JSONObject incrementalInfo = clientIncrementalMapper.findByClinetIdAndChannel(clientId, "RP跨境商城"); + JSONObject applyInfo = clientServicesApplyMapper.findApplyByClientIdAndChannel(clientId, "RP跨境商城"); + if (incrementalInfo == null && applyInfo == null) { + result.add(act); + } + }else { + result.add(act); + } } - return result; } diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientIncrementalMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientIncrementalMapper.java index af8cd7808..331160b2f 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientIncrementalMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientIncrementalMapper.java @@ -30,7 +30,8 @@ public interface ClientIncrementalMapper { " from sys_client_incremental ci inner join sys_incremental_channels si " + " on ci.channel = si.channel" + " where ci.client_id = #{client_id} " + - " and ci.channel = #{channel} ") + " and ci.channel = #{channel} " + + " and ci.is_valid = 1") JSONObject findByClinetIdAndChannel(@Param("client_id")int clientId, @Param("channel")String channel); @AutoSql(type = SqlType.INSERT) diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientServicesApplyMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientServicesApplyMapper.java index b7f205a11..bd192f707 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientServicesApplyMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientServicesApplyMapper.java @@ -25,7 +25,8 @@ public interface ClientServicesApplyMapper { JSONObject findApplyByApplyId(@Param("apply_id") String applyId); @AutoSql(type = SqlType.SELECT) - JSONObject findApplyByClientId(@Param("client_id") int clientId); + @AdvanceSelect(addonWhereClause = "is_valid = 1 and status = 0") + JSONObject findApplyByClientIdAndChannel(@Param("client_id") int clientId,@Param("channel") String channel); PageList listServicesApply(JSONObject params, PageBounds pageBounds); diff --git a/src/main/ui/login.html b/src/main/ui/login.html index 4f4677ea8..70be7cfb9 100644 --- a/src/main/ui/login.html +++ b/src/main/ui/login.html @@ -339,7 +339,7 @@ url: '/global/userstatus/partner_signin_app_qrcode/' + codeId + '/check', method: 'get', success: function () { - location.href = '/index.html' + getGeekSsoLoginUrl(); }, error: function () { if ($('#qrdiv').is(":visible")) { @@ -351,6 +351,18 @@ }) } + function getGeekSsoLoginUrl() { + var url = "http://mch.dev.geekforbest.com/#/sso_login?token="; + $http.get("/client/partner_info/incremental_service/RP跨境商城/login_token").then(function (res) { + url += res.data.token; + window.open(url, '_blank'); + location.href = '/index.html'; + }, function (resp) { + console.log(resp.data.message) + location.href = '/index.html'; + }); + }; + $('#forgetPassword-btn').click(function () { // $('#findPassword').show(); diff --git a/src/main/ui/login_v1.html b/src/main/ui/login_v1.html index b164924f9..2ae787cac 100644 --- a/src/main/ui/login_v1.html +++ b/src/main/ui/login_v1.html @@ -320,7 +320,7 @@ url: '/global/userstatus/partner_signin_app_qrcode/' + codeId + '/check', method: 'get', success: function () { - location.href = '/index.html' + getGeekSsoLoginUrl(); }, error: function () { if ($('#qrdiv').is(":visible")) { @@ -332,6 +332,18 @@ }) } + function getGeekSsoLoginUrl() { + var url = "http://mch.dev.geekforbest.com/#/sso_login?token="; + $http.get("/client/partner_info/incremental_service/RP跨境商城/login_token").then(function (res) { + url += res.data.token; + window.open(url, '_blank'); + location.href = '/index.html'; + }, function (resp) { + console.log(resp.data.message) + location.href = '/index.html'; + }); + }; + $('#forgetPassword-btn').click(function () { // $('#findPassword').show();