红点:优先提出好友推送系统

This commit is contained in:
luying
2021-05-31 12:55:21 +08:00
parent d7a49dfb9c
commit 17a90dea37
4 changed files with 280 additions and 82 deletions

View File

@@ -23,6 +23,8 @@ import { addRoleToGuildChannel, addRoleToSysChannel, addRoleToWorldChannel, leav
import { reportOneOnline } from '../../../services/timeTaskService';
import { Rank } from '../../../services/rankService';
import { checkTaskWithRole, getCurTask } from '../../../services/taskService';
import { pushData } from '../../../services/connectorService';
export default function (app: Application) {
return new EntryHandler(app);
}
@@ -47,7 +49,7 @@ export class EntryHandler {
return resResult(STATUS.TOKEN_ERR);
}
let role = await RoleModel.findByUidAndSetTime(user.uid, serverId, ROLE_SELECT.ENTRY, true);
let role = await RoleModel.findByUidAndSetTime(user.uid, serverId, null, true);
if (!role) {
return resResult(STATUS.ROLE_NOT_FOUND);
}
@@ -114,6 +116,8 @@ export class EntryHandler {
// 任务
checkTaskWithRole(serverId, role.roleId, self.app.get('serverId'), role.funcs, TASK_TYPE.LOGIN_SUM, role);
checkTaskWithRole(serverId, role.roleId, self.app.get('serverId'), role.funcs, TASK_TYPE.LOGIN_SERIES, role);
// 推送数据
pushData(role, session);
role['heros'] = heros;
role['equips'] = equips;