🐞 fix(gvg): 结算页面将其他城池也返回

This commit is contained in:
luying
2023-03-22 18:06:39 +08:00
parent d98e96c403
commit f289856722
5 changed files with 29 additions and 10 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ export default class GVGLeaguePrepare extends BaseModel {
public static async findByLeagueCodes(configId: number, leagueCodes: string[]) {
const result: GVGLeaguePrepareType[] = await GVGLeaguePrepareModel.findOne({ configId, leagueCode: { $in: leagueCodes } }).lean();
const result: GVGLeaguePrepareType[] = await GVGLeaguePrepareModel.find({ configId, leagueCode: { $in: leagueCodes } }).lean();
return result;
}
+8 -5
View File
@@ -626,15 +626,18 @@ export class VestigeRank {
// 大地图上城池占林
export class GVGCityMapInfo {
cityId: number; // 城池id
guardLeagueCode: string; // 驻守城池的联军id
guardLeagueName: string; // 驻守这个城池的联军
guardLeagueIcon: number; // 驻守这个城池的联军的icon
guardLeagueCode: string = ''; // 驻守城池的联军id
guardLeagueName: string = ''; // 驻守这个城池的联军
guardLeagueIcon: number = 0; // 驻守这个城池的联军的icon
teamCnt: number; // 我方人数
score: number;
constructor(city: GVGCityType) {
constructor(cityId: number) {
this.cityId = cityId;
}
setCity(city: GVGCityType) {
if(!city) return;
this.cityId = city.cityId;
this.guardLeagueCode = city.guardLeague;
this.guardLeagueName = city.guardLeagueName;
this.guardLeagueIcon = city.guardLeagueIcon;