添加ip归属地

This commit is contained in:
luying
2022-08-04 13:38:38 +08:00
parent b83d9db979
commit d656d12a74
9 changed files with 35 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ import { getExpByLv } from '../../../pubUtils/data';
import { reportCreateRoleEventToTa, reportTAEvent, reportTAUserSet } from '../../../services/sdkService';
import { saveLoginAndOutLog } from '../../../pubUtils/logUtil';
import { sendMessageToAllWithSuc } from '../../../services/pushService';
import { setIpLocation } from '../../../services/roleService';
export default function (app: Application) {
new HandlerService(app, {});
@@ -63,6 +64,8 @@ export class EntryHandler {
return resResult(STATUS.ROLE_NOT_FOUND);
}
setIpLocation(role.roleId, this.getIp(session));
let serverName = this.app.getServerId();
await roleLogin(role.roleId, user.userCode, serverName, role.createTime, role.serverId, role.lv, role.topLineupCe); // 保存在线用户
await this.addSession(user, role, session);