🐞 fix(gvg): 激战期有时areaId为0
This commit is contained in:
@@ -59,6 +59,12 @@ export default class GVGCity extends BaseModel {
|
||||
return city;
|
||||
}
|
||||
|
||||
// 添加人数
|
||||
public static async increaseTeam(configId: number, groupKey: string, cityId: number, roleId: string) {
|
||||
const city: GVGCityType = await GVGCityModel.findOneAndUpdate({ configId, groupKey, cityId, 'players.roleId': roleId }, { $inc: { 'players.$.teamCnt': 1 }}, { new: true }).lean();
|
||||
return city;
|
||||
}
|
||||
|
||||
// 查询联军驻守情况
|
||||
public static async findGuardCityByLeague(configId: number, leagueCode: string, select = '') {
|
||||
const cities: GVGCityType[] = await GVGCityModel.find({ configId, guardLeague: leagueCode, hasGuard: true }).select(select).lean();
|
||||
|
||||
Reference in New Issue
Block a user