排行榜:修改领取奖励返回格式

This commit is contained in:
luying
2021-09-11 14:37:22 +08:00
parent c5c7218160
commit ca86d772fe
3 changed files with 14 additions and 9 deletions

View File

@@ -12,6 +12,7 @@ import { getWorldChannelSid } from "./chatChannelService";
import { pinus } from "pinus";
import { RankFirstModel, RankFirstType, RankFirstUpdateParam } from "../db/RankFirst";
import { getRandSingleEelm } from "../pubUtils/util";
import { RANK_FIRST_REWARD_STATUS } from '../consts';
/**
@@ -1064,10 +1065,10 @@ export async function getGeneralRank(role: RoleType & { rankReceived: number[] }
}
if(rankFirst) {
let status = rankReceived.includes(id)?2: 1;
let status = rankReceived.includes(id)?RANK_FIRST_REWARD_STATUS.RECEIVED: RANK_FIRST_REWARD_STATUS.CAN_RECEIVE;
result.push({...rankFirst, status});
} else {
result.push({ id, type, status: 0 });
result.push({ id, type, status: RANK_FIRST_REWARD_STATUS.WAITING });
}
}
return result;