pvp战报顺序

This commit is contained in:
mamengke01
2021-01-15 16:32:13 +08:00
parent a3e4149b41
commit 947077dbb4
2 changed files with 3 additions and 3 deletions
@@ -122,9 +122,9 @@ export class PvpHandler {
let {actorId, dataId, order} = cur; let {actorId, dataId, order} = cur;
return { actorId, dataId, order } return { actorId, dataId, order }
}), score, pLv, winStreakNum, refOppCnt, challengeCnt, challengeRefTime, receivedBox, hisScore, heroScores, isFirstEntry, isDefaultHero } }), score, pLv, winStreakNum, refOppCnt, challengeCnt, challengeRefTime, receivedBox, hisScore, heroScores, isFirstEntry, isDefaultHero }
// if (show) {//是否弹出结算奖励 if (show) {//是否弹出结算奖励
data.resultRecord = { oldSeasonData, heroGoods, rankGoods } data.resultRecord = { oldSeasonData, heroGoods, rankGoods }
// } }
return resResult(STATUS.SUCCESS, data); return resResult(STATUS.SUCCESS, data);
} }
+1 -1
View File
@@ -88,7 +88,7 @@ export default class PvpRecord extends BaseModel {
public static async getRecByRoleId( roleId: string, limit = 15, lean = true) { public static async getRecByRoleId( roleId: string, limit = 15, lean = true) {
await this.delPvpRecords(); await this.delPvpRecords();
const result: PvpRecord[] = await PvpRecordModel.find({ $or:[{roleId1: roleId}, {roleId2: roleId}] }).limit(limit).sort({lt: -1}).lean(lean); const result: PvpRecord[] = await PvpRecordModel.find({ $or:[{roleId1: roleId}, {roleId2: roleId}] }).limit(limit).sort({createTime: -1}).lean(lean);
return result; return result;
} }