🐞 fix(gvg): 修复战区问题,不跨服服务器应单列

This commit is contained in:
luying
2023-02-20 20:46:20 +08:00
parent 015b4293fb
commit 5b3747a78e
27 changed files with 324 additions and 390 deletions
+3 -6
View File
@@ -71,10 +71,7 @@ export default class GVGBattleRec extends BaseModel {
configId: number; // 赛季
@prop({ required: true })
groupId: number; // 战区
@prop({ required: true })
serverType: number; // 1-单服 2-跨服
groupKey: string; // 1-单服 2-跨服
@prop({ required: true })
warId: number; // 关卡id
@@ -91,9 +88,9 @@ export default class GVGBattleRec extends BaseModel {
@prop({ required: true })
battleEndTime: number;
public static async createRec(configId: number, groupId: number, serverType: number, warId: number, attackTeam: GVGTeamType, defenseTeam: GVGTeamType) {
public static async createRec(configId: number, groupKey: string, warId: number, attackTeam: GVGTeamType, defenseTeam: GVGTeamType) {
const battleCode = genCode(8);
const result: GVGBattleRecType = await GVGBattleRecModel.findOneAndUpdate({ battleCode }, { $set: { configId, groupId, serverType, warId, attackTeam, defenseTeam, isSuccess: false } }, { new: true, upsert: true }).lean();
const result: GVGBattleRecType = await GVGBattleRecModel.findOneAndUpdate({ battleCode }, { $set: { configId, groupKey, warId, attackTeam, defenseTeam, isSuccess: false } }, { new: true, upsert: true }).lean();
return result;
}