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
log.Printf("select db err:", err)
}
for i := 0; i < len(strList); i += 2 {
// startIndex := strings.Index(strList[i], "uid:") + 4
// endIndex := strings.Index(strList[i], ":gtid")
// currUID := common.Substr2(strList[i], startIndex, endIndex)
startIndex := strings.Index(strList[i], "uid:") + 4
endIndex := strings.Index(strList[i], ":gtid")
currUID := common.Substr2(strList[i], startIndex, endIndex)
var s int
if i == 0 {
s = 0
} else {
s = i / 2
}
log.Println("s:", s, "i:", i)
if prerankIndex+index-1 == rankIndex {
resIndex = prerankIndex + index
}
igt[s].UID = uid
igt[s].UID = currUID
igt[s].RankIndex = prerankIndex + index
igt[s].MyKey = strList[i+1]
//查询储存昵称以及头像url的redis
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!