Commit ee03c575 by xuzhenhao

增加了redis工具库中的方法

1 parent 12420c0f
Showing with 2 additions and 2 deletions
...@@ -433,11 +433,11 @@ func IceGameTopRedisGetSingleUserRangeRankInfo(uid string, gtid string, gid stri ...@@ -433,11 +433,11 @@ func IceGameTopRedisGetSingleUserRangeRankInfo(uid string, gtid string, gid stri
var strList, strList1, strList2 []string var strList, strList1, strList2 []string
if sorceorder == "1" { if sorceorder == "1" {
if nextrankIndex != 0 { if nextrankIndex != 0 {
strList1, err = RedisZRangeByScore(redisConn, "sortset:gtid:"+gtid+":gid:"+gid+":toptype:"+toptype, score, "+inf", "true", 0, nextrankIndex) strList1, err = RedisZRangeByScore(redisConn, "sortset:gtid:"+gtid+":gid:"+gid+":toptype:"+toptype, scoreString, "+inf", "true", 0, nextrankIndex)
} }
if prerankIndex != 0 { if prerankIndex != 0 {
strList2, err = RedisZRevRangeByScore(redisConn, "sortset:gtid:"+gtid+":gid:"+gid+":toptype:"+toptype, score, "-inf", "true", 0, prerankIndex) strList2, err = RedisZRevRangeByScore(redisConn, "sortset:gtid:"+gtid+":gid:"+gid+":toptype:"+toptype, scoreString, "-inf", "true", 0, prerankIndex)
//将结果倒序 //将结果倒序
var tempList []string var tempList []string
for i := len(strList2); i < 0; i -= 2 { for i := len(strList2); i < 0; i -= 2 {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!