任务:埋点完成

This commit is contained in:
luying
2021-04-18 19:25:25 +08:00
parent 4bd4513ae6
commit 260744e7d2
20 changed files with 234 additions and 67 deletions

View File

@@ -1,7 +1,7 @@
import { gameData, getGuildActiveWeekReward, getGuildActiveByIdAndType, getGoodById } from "../pubUtils/data";
import { GuildModel } from "../db/Guild";
import { resResult, shouldRefresh } from "../pubUtils/util";
import { STATUS, MAIL_TYPE, GUILD_AUTH, GUILD_JOB, REDIS_KEY, CHAT_SERVER } from "../consts";
import { STATUS, MAIL_TYPE, GUILD_AUTH, GUILD_JOB, REDIS_KEY, CHAT_SERVER, TASK_TYPE } from "../consts";
import { RoleModel } from "../db/Role";
import { UserGuildModel, UserGuildType } from "../db/UserGuild";
import { UserGuildApplyModel } from "../db/UserGuildApply";
@@ -20,6 +20,7 @@ import { getMailContent } from '../services/mailService';
import { DATA_NAME } from '../consts/dataName';
import { addRoleToGuildChannel } from "./chatService";
import { Rank } from "./rankService";
import { checkTask } from "./taskService";
/**
* @description 检查该玩家是否有权限做操作
@@ -277,6 +278,8 @@ export async function settleGuildWeekly() {
}
});
await sendMail(MAIL_TYPE.GUILD_ACTIVE_REWARD, roleId, '系统', [], reward);
// 任务
await checkTask(roleId, null, TASK_TYPE.GUILD_JOB, 1, false, { job });
}
await GuildModel.updateInfo(code, { activeWeekly: 0 }, {});