活动:清理数据

This commit is contained in:
陆莹
2022-03-21 19:50:46 +08:00
parent 1c3d1c209c
commit 4f5edb7386
60 changed files with 1447 additions and 1076 deletions

View File

@@ -4,7 +4,7 @@ import { resResult } from '../../../pubUtils/util';
import { DEFAULT_MSG_PER_PAGE, STATUS, TASK_TYPE } from '../../../consts';
import { createAccuseData, createGroupMsg, createPrivateMsg, getPrivateMessages, pushGroupMsgToRoom, pushMsgToRole, updatePrivateMsgReadInfo, recentPrivateChatInfos, recentWorldMsgs, recentSysMsgs, recentGuildMsgs, updatePrivateMsgIsTop, delPrivateMsg } from '../../../services/chatService';
import { getSimpleRoleInfo } from '../../../services/roleService';
import { checkActivityTask, checkTaskWithArgs } from '../../../services/task/taskService';
import { checkTask } from '../../../services/task/taskService';
import { RoleModel } from '../../../db/Role';
@@ -99,10 +99,7 @@ export class ChatHandler {
await pushGroupMsgToRoom(msgData);
// 任务
await checkTaskWithArgs(roleId, sid, TASK_TYPE.CHAT, [getChannelType(channel)]);
//活动任务
await checkActivityTask(serverId, sid, roleId, TASK_TYPE.CHAT, 1, { chatType: getChannelType(channel) })
await checkTask(serverId, roleId, sid, TASK_TYPE.CHAT, { chatType: getChannelType(channel) });
return resResult(STATUS.SUCCESS, msgData);
}
@@ -125,10 +122,7 @@ export class ChatHandler {
if (!msgData) return resResult(STATUS.WRONG_PARMS);
// 任务
await checkTaskWithArgs(roleId, sid, TASK_TYPE.CHAT, [getChannelType('private')]);
//活动任务
await checkActivityTask(serverId, sid, roleId, TASK_TYPE.CHAT, 1, { chatType: getChannelType('private') })
await checkTask(serverId, roleId, sid, TASK_TYPE.CHAT, { chatType: getChannelType('private') });
return resResult(STATUS.SUCCESS, msgData);
}