✨ feat(gvg): 添加联军频道
This commit is contained in:
+6
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user