master
wangning 7 years ago
parent 2cb3f6ef3d
commit ddd7b5e795

@ -160,7 +160,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
public JSONObject clientLoginCheck(LoginInfo loginInfo) { public JSONObject clientLoginCheck(LoginInfo loginInfo) {
JSONObject account = clientAccountMapper.findByUsername(loginInfo.getLoginId()); JSONObject account = clientAccountMapper.findByUsername(loginInfo.getLoginId());
validLoginInfo(loginInfo, account); validLoginInfo(loginInfo, account);
publisher.publishEvent(new ClientLoginEvent(this, account.getIntValue("client_id"), account.getIntValue("account_id"), RequestEnvironment.getClientIp(), "PASSWORD")); publisher.publishEvent(new ClientLoginEvent(this, account.getIntValue("client_id"), account.getString("account_id"), RequestEnvironment.getClientIp(), "PASSWORD"));
return account; return account;
} }
@ -236,7 +236,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
if (account == null) { if (account == null) {
throw new ForbiddenException("Your WeChat Account haven't bind to a client user"); throw new ForbiddenException("Your WeChat Account haven't bind to a client user");
} }
publisher.publishEvent(new ClientLoginEvent(this, account.getIntValue("client_id"), account.getIntValue("account_id"), RequestEnvironment.getClientIp(), "wechat")); publisher.publishEvent(new ClientLoginEvent(this, account.getIntValue("client_id"), account.getString("account_id"), RequestEnvironment.getClientIp(), "wechat"));
return account; return account;
} }
@ -246,7 +246,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
if (account == null) { if (account == null) {
return null; return null;
} }
publisher.publishEvent(new ClientLoginEvent(this, account.getIntValue("client_id"), account.getIntValue("account_id"), RequestEnvironment.getClientIp(), "wechat")); publisher.publishEvent(new ClientLoginEvent(this, account.getIntValue("client_id"), account.getString("account_id"), RequestEnvironment.getClientIp(), "wechat"));
return account; return account;
} }

@ -10,11 +10,11 @@ import java.util.Date;
*/ */
public class ClientLoginEvent extends ApplicationEvent { public class ClientLoginEvent extends ApplicationEvent {
private final int clientId; private final int clientId;
private final int accountId; private final String accountId;
private final String ip; private final String ip;
private final String method; private final String method;
public ClientLoginEvent(Object source, int clientId, int accountId, String ip, String method) { public ClientLoginEvent(Object source, int clientId, String accountId, String ip, String method) {
super(source); super(source);
this.clientId = clientId; this.clientId = clientId;
this.accountId = accountId; this.accountId = accountId;

Loading…
Cancel
Save