|
|
@ -4,6 +4,7 @@ import au.com.royalpay.payment.manage.appclient.beans.RetailLoginInfo;
|
|
|
|
import au.com.royalpay.payment.manage.appclient.core.ManageAppService;
|
|
|
|
import au.com.royalpay.payment.manage.appclient.core.ManageAppService;
|
|
|
|
import au.com.royalpay.payment.manage.appclient.core.RetailAppService;
|
|
|
|
import au.com.royalpay.payment.manage.appclient.core.RetailAppService;
|
|
|
|
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
|
|
|
|
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.device.core.DeviceManager;
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
|
|
|
import au.com.royalpay.payment.manage.signin.beans.LoginInfo;
|
|
|
|
import au.com.royalpay.payment.manage.signin.beans.LoginInfo;
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.SignInStatusManager;
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.SignInStatusManager;
|
|
|
@ -61,6 +62,8 @@ public class RetailValidationController implements ApplicationEventPublisherAwar
|
|
|
|
private ApplicationEventPublisher publisher;
|
|
|
|
private ApplicationEventPublisher publisher;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private ManageAppService manageAppService;
|
|
|
|
private ManageAppService manageAppService;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private DeviceManager deviceManager;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {
|
|
|
|
public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {
|
|
|
@ -95,6 +98,7 @@ public class RetailValidationController implements ApplicationEventPublisherAwar
|
|
|
|
client = JSON.parseObject(client.toJSONString());
|
|
|
|
client = JSON.parseObject(client.toJSONString());
|
|
|
|
if (loginInfo.getDevId() != null) {
|
|
|
|
if (loginInfo.getDevId() != null) {
|
|
|
|
deviceSupport.validDeviceWithClient(client, loginInfo.getDevId());
|
|
|
|
deviceSupport.validDeviceWithClient(client, loginInfo.getDevId());
|
|
|
|
|
|
|
|
deviceManager.offlineNotCurrentUserByDevIdAndAccountId(loginInfo.getDevId(),client.getString("account_id"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
client.put("sign_key", signKey);
|
|
|
|
client.put("sign_key", signKey);
|
|
|
|
return client;
|
|
|
|
return client;
|
|
|
@ -219,7 +223,10 @@ public class RetailValidationController implements ApplicationEventPublisherAwar
|
|
|
|
result.put("account",account);
|
|
|
|
result.put("account",account);
|
|
|
|
result.put("status","success");
|
|
|
|
result.put("status","success");
|
|
|
|
result.put("bind_status", true);
|
|
|
|
result.put("bind_status", true);
|
|
|
|
|
|
|
|
if (params.getString("devId") != null) {
|
|
|
|
|
|
|
|
deviceSupport.validDeviceWithClient(account, params.getString("devId"));
|
|
|
|
|
|
|
|
deviceManager.offlineNotCurrentUserByDevIdAndAccountId(params.getString("devId"),account.getString("account_id"));
|
|
|
|
|
|
|
|
}
|
|
|
|
this.publisher.publishEvent(new ClientLoginEvent(this, account.getIntValue("client_id"), account.getString("account_id"), RequestEnvironment.getClientIp(), "MOBILE"));
|
|
|
|
this.publisher.publishEvent(new ClientLoginEvent(this, account.getIntValue("client_id"), account.getString("account_id"), RequestEnvironment.getClientIp(), "MOBILE"));
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
result.put("status","success");
|
|
|
|
result.put("status","success");
|
|
|
@ -254,9 +261,6 @@ public class RetailValidationController implements ApplicationEventPublisherAwar
|
|
|
|
account = JSON.parseObject(account.toJSONString());
|
|
|
|
account = JSON.parseObject(account.toJSONString());
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
result.put("account",account);
|
|
|
|
result.put("account",account);
|
|
|
|
if (params.getString("devId") != null) {
|
|
|
|
|
|
|
|
deviceSupport.validDeviceWithClient(account, params.getString("devId"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
result.put("bind_status", true);
|
|
|
|
result.put("bind_status", true);
|
|
|
|
this.publisher.publishEvent(new ClientLoginEvent(this, account.getIntValue("client_id"), account.getString("account_id"), RequestEnvironment.getClientIp(), "MOBILE"));
|
|
|
|
this.publisher.publishEvent(new ClientLoginEvent(this, account.getIntValue("client_id"), account.getString("account_id"), RequestEnvironment.getClientIp(), "MOBILE"));
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
@ -276,6 +280,10 @@ public class RetailValidationController implements ApplicationEventPublisherAwar
|
|
|
|
deviceSupport.validDeviceWithClient(account, params.getString("app_openid"));
|
|
|
|
deviceSupport.validDeviceWithClient(account, params.getString("app_openid"));
|
|
|
|
return account;
|
|
|
|
return account;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (params.getString("devId") != null) {
|
|
|
|
|
|
|
|
deviceSupport.validDeviceWithClient(account, params.getString("devId"));
|
|
|
|
|
|
|
|
deviceManager.offlineNotCurrentUserByDevIdAndAccountId(params.getString("devId"),account.getString("account_id"));
|
|
|
|
|
|
|
|
}
|
|
|
|
this.publisher.publishEvent(new ClientLoginEvent(this, account.getJSONObject("account").getIntValue("client_id"), account.getJSONObject("account").getString("account_id"), RequestEnvironment.getClientIp(), "wechat"));
|
|
|
|
this.publisher.publishEvent(new ClientLoginEvent(this, account.getJSONObject("account").getIntValue("client_id"), account.getJSONObject("account").getString("account_id"), RequestEnvironment.getClientIp(), "wechat"));
|
|
|
|
return account;
|
|
|
|
return account;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -297,9 +305,6 @@ public class RetailValidationController implements ApplicationEventPublisherAwar
|
|
|
|
params.put("union_id",wechatInfo.getString("union_id"));
|
|
|
|
params.put("union_id",wechatInfo.getString("union_id"));
|
|
|
|
retailAppService.updateLoginClientAccountOpenId(account,params);
|
|
|
|
retailAppService.updateLoginClientAccountOpenId(account,params);
|
|
|
|
account = JSON.parseObject(account.toJSONString());
|
|
|
|
account = JSON.parseObject(account.toJSONString());
|
|
|
|
if (params.getString("devId") != null) {
|
|
|
|
|
|
|
|
deviceSupport.validDeviceWithClient(account, params.getString("devId"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
account.put("sign_key", signKey);
|
|
|
|
account.put("sign_key", signKey);
|
|
|
|
result.put("account",account);
|
|
|
|
result.put("account",account);
|
|
|
|