add App扫码同时单点登录跨境商城

master
luoyang 5 years ago
parent ff5a3cbc46
commit a31f127c26

@ -9,7 +9,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId> <artifactId>manage</artifactId>
<version>1.3.49</version> <version>1.3.50</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.8.0</jib-maven-plugin.version> <jib-maven-plugin.version>1.8.0</jib-maven-plugin.version>

@ -227,6 +227,10 @@ public class RetailAppServiceImp implements RetailAppService {
@Resource @Resource
private RetailAppService retailAppService; private RetailAppService retailAppService;
@Resource @Resource
private ClientIncrementalMapper clientIncrementalMapper;
@Resource
private ClientServicesApplyMapper clientServicesApplyMapper;
@Resource
private DeviceManager deviceManager; private DeviceManager deviceManager;
private final String CBBANK_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2019/08/05/1564972204689_uwZvpTBjtLUMcN8c540xcZvux1Rd3O.pdf"; 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"; 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(); JSONObject act = new JSONObject();
act.put("data", latestAct); act.put("data", latestAct);
act.put("type", "act"); act.put("type", "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); result.add(act);
} }
}else {
result.add(act);
}
}
return result; return result;
} }

@ -30,7 +30,8 @@ public interface ClientIncrementalMapper {
" from sys_client_incremental ci inner join sys_incremental_channels si " + " from sys_client_incremental ci inner join sys_incremental_channels si " +
" on ci.channel = si.channel" + " on ci.channel = si.channel" +
" where ci.client_id = #{client_id} " + " 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); JSONObject findByClinetIdAndChannel(@Param("client_id")int clientId, @Param("channel")String channel);
@AutoSql(type = SqlType.INSERT) @AutoSql(type = SqlType.INSERT)

@ -25,7 +25,8 @@ public interface ClientServicesApplyMapper {
JSONObject findApplyByApplyId(@Param("apply_id") String applyId); JSONObject findApplyByApplyId(@Param("apply_id") String applyId);
@AutoSql(type = SqlType.SELECT) @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<JSONObject> listServicesApply(JSONObject params, PageBounds pageBounds); PageList<JSONObject> listServicesApply(JSONObject params, PageBounds pageBounds);

@ -339,7 +339,7 @@
url: '/global/userstatus/partner_signin_app_qrcode/' + codeId + '/check', url: '/global/userstatus/partner_signin_app_qrcode/' + codeId + '/check',
method: 'get', method: 'get',
success: function () { success: function () {
location.href = '/index.html' getGeekSsoLoginUrl();
}, },
error: function () { error: function () {
if ($('#qrdiv').is(":visible")) { 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 () { $('#forgetPassword-btn').click(function () {
// $('#findPassword').show(); // $('#findPassword').show();

@ -320,7 +320,7 @@
url: '/global/userstatus/partner_signin_app_qrcode/' + codeId + '/check', url: '/global/userstatus/partner_signin_app_qrcode/' + codeId + '/check',
method: 'get', method: 'get',
success: function () { success: function () {
location.href = '/index.html' getGeekSsoLoginUrl();
}, },
error: function () { error: function () {
if ($('#qrdiv').is(":visible")) { 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 () { $('#forgetPassword-btn').click(function () {
// $('#findPassword').show(); // $('#findPassword').show();

Loading…
Cancel
Save