军团活动:蛮夷入侵主动接口
This commit is contained in:
@@ -628,8 +628,18 @@ export async function getMyUnionRank(key: string, serverId: number, roleId: stri
|
||||
return myRank + 1;
|
||||
}
|
||||
|
||||
export async function getRankScore(key: string, serverId: number, field: string) {
|
||||
/**
|
||||
* 获取拼接得分的排行榜的某一个人的得分
|
||||
* @param key REDIS_KEY中配置的
|
||||
* @param serverId 分服
|
||||
* @param field 查询的人
|
||||
*/
|
||||
export async function getRankScore(key: string, serverId: number, field: string, needDecode = false) {
|
||||
let score = await redisClient().zscoreAsync(getKeyName(key, serverId), field);
|
||||
if(!score) score = 0;
|
||||
if(needDecode) {
|
||||
score = decodeScoreWithTime(score.toString());
|
||||
}
|
||||
return score;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user