Commit ac48ee16 by xuzhenhao

修复了uid相同的bug

1 parent 2d73ac23
Showing with 5 additions and 4 deletions
...@@ -445,19 +445,20 @@ func IceGameTopRedisGetSingleUserRangeRankInfo(uid string, gtid string, gid stri ...@@ -445,19 +445,20 @@ func IceGameTopRedisGetSingleUserRangeRankInfo(uid string, gtid string, gid stri
log.Printf("select db err:", err) log.Printf("select db err:", err)
} }
for i := 0; i < len(strList); i += 2 { for i := 0; i < len(strList); i += 2 {
// startIndex := strings.Index(strList[i], "uid:") + 4 startIndex := strings.Index(strList[i], "uid:") + 4
// endIndex := strings.Index(strList[i], ":gtid") endIndex := strings.Index(strList[i], ":gtid")
// currUID := common.Substr2(strList[i], startIndex, endIndex) currUID := common.Substr2(strList[i], startIndex, endIndex)
var s int var s int
if i == 0 { if i == 0 {
s = 0 s = 0
} else { } else {
s = i / 2 s = i / 2
} }
log.Println("s:", s, "i:", i)
if prerankIndex+index-1 == rankIndex { if prerankIndex+index-1 == rankIndex {
resIndex = prerankIndex + index resIndex = prerankIndex + index
} }
igt[s].UID = uid igt[s].UID = currUID
igt[s].RankIndex = prerankIndex + index igt[s].RankIndex = prerankIndex + index
igt[s].MyKey = strList[i+1] igt[s].MyKey = strList[i+1]
//查询储存昵称以及头像url的redis //查询储存昵称以及头像url的redis
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!