master
wangning 7 years ago
parent 2cb3f6ef3d
commit ddd7b5e795

@ -160,7 +160,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
public JSONObject clientLoginCheck(LoginInfo loginInfo) {
JSONObject account = clientAccountMapper.findByUsername(loginInfo.getLoginId());
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;
}
@ -236,7 +236,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
if (account == null) {
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;
}
@ -246,7 +246,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
if (account == 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;
}

@ -10,11 +10,11 @@ import java.util.Date;
*/
public class ClientLoginEvent extends ApplicationEvent {
private final int clientId;
private final int accountId;
private final String accountId;
private final String ip;
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);
this.clientId = clientId;
this.accountId = accountId;

Loading…
Cancel
Save