feat(gvg): 添加联军频道

This commit is contained in:
luying
2023-02-21 17:16:49 +08:00
parent 22b3dbc551
commit 3eb6a1045f
19 changed files with 218 additions and 38 deletions
+6 -1
View File
@@ -49,10 +49,15 @@ export default class GVGRec extends BaseModel {
// 查询城池战报
public static async findBattleRecByCity(configId: number, groupKey: string, cityId: number) {
const result: GVGRecType[] = await GVGRecModel.find({ cityId, configId, groupKey, type: GVG_REC_TYPE.BATTLE_BY_CITY }, { _id: 0, recId: 1, params: 1, createTime: 1 }).sort({ createTime: -1 }).limit(50).lean();
const result: GVGRecType[] = await GVGRecModel.find({ configId, groupKey, type: GVG_REC_TYPE.BATTLE_BY_CITY, cityId }, { _id: 0, recId: 1, params: 1, createTime: 1 }).sort({ createTime: -1 }).limit(50).lean();
return result;
}
public static async findBattleRecByGroup(configId: number, groupKey: string) {
const result: GVGRecType[] = await GVGRecModel.find({ configId, groupKey, type: GVG_REC_TYPE.BATTLE_BY_CITY }, { _id: 0, recId: 1, params: 1, createTime: 1 }).sort({ createTime: -1 }).limit(50).lean();
return result;
}
public static async findBattleRecByLeague(configId: number, leagueCode: string) {
const result: GVGRecType[] = await GVGRecModel.find({ configId, leagueCode, type: GVG_REC_TYPE.BATTLE_BY_LEAGUE }, { _id: 0, recId: 1, params: 1, createTime: 1 }).sort({ createTime: -1 }).limit(50).lean();
return result;