Commit fe4d1c72 by xuzhenhao

增加了redis工具库中的方法

1 parent 37f2aab8
Showing with 3 additions and 1 deletions
......@@ -472,6 +472,7 @@ func IceGameTopRedisGetSingleUserRangeRankInfo(uid string, gtid string, gid stri
} else if sorceorder == "0" {
if nextrankIndex != 0 {
strList1, err = RedisZRangeByScore(redisConn, "sortset:gtid:"+gtid+":gid:"+gid+":toptype:"+toptype, scoreString, "+inf", "true", 0, prerankIndex)
log.Println("strList1 : ", strList1)
//将结果倒序
var tempList []string
......@@ -483,7 +484,7 @@ func IceGameTopRedisGetSingleUserRangeRankInfo(uid string, gtid string, gid stri
}
if prerankIndex != 0 {
strList2, err = RedisZRevRangeByScore(redisConn, "sortset:gtid:"+gtid+":gid:"+gid+":toptype:"+toptype, scoreString, "-inf", "true", 0, nextrankIndex)
log.Println("strList2 : ", strList2)
}
if len(strList1) == 0 {
strList = append(strList, "ice_gametop:uid:"+uid+":gtid:"+gtid+":gid:"+gid+":toptype:"+toptype+":mykey")
......@@ -491,6 +492,7 @@ func IceGameTopRedisGetSingleUserRangeRankInfo(uid string, gtid string, gid stri
if len(strList2) != 0 {
strList = append(strList, strList2...)
}
} else {
strList = append(strList, strList1...)
strList = append(strList, "ice_gametop:uid:"+uid+":gtid:"+gtid+":gid:"+gid+":toptype:"+toptype+":mykey")
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!