军团优化:军团上次排行榜

This commit is contained in:
luying
2022-07-22 09:42:07 +08:00
parent 1f045bd11d
commit a3af186161
17 changed files with 259 additions and 196 deletions
+7 -4
View File
@@ -289,6 +289,7 @@ export class KeyName {
hid?: number;
seasonNum?: number;
activityId?: number;
index?: number; // 军团活动第几期
constructor(key: string, param: KeyNameParam) {
this.key = key;
@@ -298,6 +299,7 @@ export class KeyName {
if(param.hid) this.hid = param.hid;
if(param.seasonNum) this.seasonNum = param.seasonNum;
if(param.activityId) this.activityId = param.activityId;
if(param.index) this.index = param.index;
}
public getName() {
@@ -311,8 +313,6 @@ export class KeyName {
case REDIS_KEY.MAIN_ELITE_RANK:
case REDIS_KEY.GUILD_LV_RANK:
case REDIS_KEY.GUILD_ACTIVE_RANK:
case REDIS_KEY.GATE_ACTIVITY:
case REDIS_KEY.RACE_ACTIVITY:
case REDIS_KEY.TOWER_RANK:
case REDIS_KEY.LADDER:
return `${this.key}:${this.serverId}`;
@@ -320,11 +320,14 @@ export class KeyName {
return `${this.key}:${this.serverId}:${this.hid}`;
case REDIS_KEY.PVP_RANK:
return `${this.key}:${this.seasonNum}`;
case REDIS_KEY.GATE_ACTIVITY:
case REDIS_KEY.RACE_ACTIVITY:
return `${this.key}:${this.serverId}:${this.index}`;
case REDIS_KEY.CITY_ACTIVITY:
return `${this.key}:${this.serverId}:${this.cityId}`;
return `${this.key}:${this.serverId}:${this.index}:${this.cityId}`;
case REDIS_KEY.USER_CITY_ACTIVITY:
case REDIS_KEY.USER_GATE_ACTIVITY:
return `${this.key}:${this.serverId}:${this.guildCode}`;
return `${this.key}:${this.serverId}:${this.index}:${this.guildCode}`;
case REDIS_KEY.GUILD_FUND:
case REDIS_KEY.SUM_CE_SNAPSHOT:
return `${this.key}:${this.serverId}:${this.activityId}`;