redis 排行榜分区

This commit is contained in:
luying
2020-11-23 16:29:21 +08:00
parent d8e2c609cb
commit aa5dc07b86
8 changed files with 72 additions and 23 deletions
+9
View File
@@ -55,6 +55,15 @@ export default class Game extends BaseModel {
@prop({ required: true })
versionCode: number;
public static async getAllServerList() {
let game = await GameModel.findOne().lean();
if(game) {
return game.serverList;
} else {
return []
}
}
public static async getServerListByType(serverType: string) {
let game = await GameModel.findOne().lean();
if (!game) {