diff --git a/game-server/app/services/rankService.ts b/game-server/app/services/rankService.ts index e3f05102f..b85b257e4 100644 --- a/game-server/app/services/rankService.ts +++ b/game-server/app/services/rankService.ts @@ -577,12 +577,12 @@ export class Rank { const { score, time } = this.decodeScore(rankFromDb[ii + 1]); const info = await redisClient().hgetAsync(this.infoKey, this.composeFields(this.infoKey, myId)); const userInfo = JSON.parse(info); - if(nowSeconds() - userInfo.updatedAt > 2 * 30 * 24 * 60 * 60) { - continue; - } let param: RoleRankInfo | GuildRankInfo; if (this.infoKey == REDIS_KEY.USER_INFO) { + if(nowSeconds() - userInfo.updatedAt > 2 * 30 * 24 * 60 * 60) { + continue; + } param = new RoleRankInfo(userInfo, false); param.setInfo(Math.floor(ii / 2) + 1, myId, score, time); } else if (this.infoKey == REDIS_KEY.GUILD_INFO) { diff --git a/game-server/app/services/redisService.ts b/game-server/app/services/redisService.ts index c2ab21406..4276feba4 100644 --- a/game-server/app/services/redisService.ts +++ b/game-server/app/services/redisService.ts @@ -19,6 +19,7 @@ export async function initAllRank() { await delKeys(REDIS_KEY.HERO_INFO); await delKeys(REDIS_KEY.PVP_RANK); await delKeys(REDIS_KEY.TOWER_RANK); + await delKeys(REDIS_KEY.GUILD_LV_RANK); await delKeys(REDIS_KEY.GUILD_ACTIVE_RANK); await delKeys(REDIS_KEY.TOP_LINEUP_RANK); await delKeys(REDIS_KEY.TOP_HERO_RANK); diff --git a/shared/pubUtils/util.ts b/shared/pubUtils/util.ts index 0206d2889..39573b94b 100644 --- a/shared/pubUtils/util.ts +++ b/shared/pubUtils/util.ts @@ -27,10 +27,10 @@ export function aesDecrypt(data, key, iv) { } export function aesEncryptcfb(data, key, iv) { - console.log('****aesEncryptcfb', data) const cipher = crypto.createCipheriv('aes-192-cfb', key, iv); let crypted = cipher.update(data, 'utf8', 'hex'); crypted += cipher.final('hex'); + console.log('****aesEncryptcfb', data, crypted) return crypted; }