diff --git a/game-server/app/services/guildTrainService.ts b/game-server/app/services/guildTrainService.ts index 546bbedbd..c125e334f 100644 --- a/game-server/app/services/guildTrainService.ts +++ b/game-server/app/services/guildTrainService.ts @@ -1,7 +1,7 @@ import { UserGuildModel, UserGuildType } from '../db/UserGuild'; import { getArmyTrainJuDian, getGuildTrainGkInfo, getTrainBaseByLv } from '../pubUtils/data'; import { nowSeconds, getZeroPoint, isToday, getSeconds } from '../pubUtils/timeUtil'; -import { GUILD_STRUCTURE, PUSH_ROUTE } from '../consts'; +import { GUILD_STRUCTURE, PUSH_ROUTE, SHOP_REFRESH_TYPE } from '../consts'; import { GuildTrainType, GuildTrainModel, TrainInstance } from '../db/GuildTrain'; import { GuildModel, GuildType } from '../db/Guild'; import { findWhere } from 'underscore'; @@ -170,9 +170,8 @@ export async function resetTrain(code: string, serverId: number) { //结算未领取的宝箱奖励发送到邮件中 userGuildList.forEach(async function ({roleId, trainRewards, createdAt}) { - if (isToday(getSeconds(createdAt))) { - // 此处发放的奖励是昨天该军团的奖励 - // 今天加入军团的玩家,不发放 + if (getZeroPoint(SHOP_REFRESH_TYPE.WEEKLY) < getSeconds(createdAt)) { + // 此处发放的奖励是上周该军团的奖励; 如果本周一5AM之后,不发放 return; } let goods: { id: number, count: number }[] = [];