✨ feat(gvg): 添加激战期动态
This commit is contained in:
+11
-2
@@ -45,11 +45,20 @@ export default class GVGRec extends BaseModel {
|
||||
}
|
||||
|
||||
// 查询城池战报
|
||||
public static async findByCity(cityId: number, configId: number) {
|
||||
const result: GVGRecType[] = await GVGRecModel.find({ cityId, configId }, { _id: 0, recId: 1, params: 1, createTime: 1 }).sort({ createTime: -1 }).limit(50).lean();
|
||||
public static async findBattleRecByCity(configId: number, groupId: number, serverType: number, cityId: number) {
|
||||
const result: GVGRecType[] = await GVGRecModel.find({ cityId, configId, groupId, serverType, 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;
|
||||
}
|
||||
|
||||
public static async findBattleRecByRole(configId: number, roleId: string, leagueCode: string) {
|
||||
const result: GVGRecType[] = await GVGRecModel.find({ configId, roleId, leagueCode, type: GVG_REC_TYPE.BATTLE_BY_ROLE }, { _id: 0, recId: 1, params: 1, createTime: 1 }).sort({ createTime: -1 }).limit(50).lean();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
export const GVGRecModel = getModelForClass(GVGRec);
|
||||
|
||||
Reference in New Issue
Block a user