Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
xuzhenhao
/
rlw-dev
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4d20985b
authored
Dec 09, 2017
by
xuzhenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加了返回个人排行信息的时候可以看到前后玩家信息的功能
1 parent
6037c7bc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
sdkredis/ice_gametopREDIS.go
sdkredis/ice_gametopREDIS.go
View file @
4d20985
...
@@ -447,13 +447,18 @@ func IceGameTopRedisGetSingleUserRangeRankInfo(uid string, gtid string, gid stri
...
@@ -447,13 +447,18 @@ func IceGameTopRedisGetSingleUserRangeRankInfo(uid string, gtid string, gid stri
// 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
igt
[
i
/
2
]
.
UID
=
uid
if
i
==
0
{
igt
[
i
/
2
]
.
RankIndex
=
index
s
=
0
igt
[
i
/
2
]
.
MyKey
=
strList
[
i
+
1
]
}
else
{
s
=
i
/
2
}
igt
[
s
]
.
UID
=
uid
igt
[
s
]
.
RankIndex
=
index
igt
[
s
]
.
MyKey
=
strList
[
i
+
1
]
//查询储存昵称以及头像url的redis
//查询储存昵称以及头像url的redis
var
err
error
var
err
error
resultstr
,
err
=
RedisGetKV
(
redisConn
,
"GUID:"
+
igt
[
i
/
2
]
.
UID
)
resultstr
,
err
=
RedisGetKV
(
redisConn
,
"GUID:"
+
igt
[
s
]
.
UID
)
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Println
(
"get redis err:"
,
err
)
log
.
Println
(
"get redis err:"
,
err
)
}
}
...
@@ -472,8 +477,8 @@ func IceGameTopRedisGetSingleUserRangeRankInfo(uid string, gtid string, gid stri
...
@@ -472,8 +477,8 @@ func IceGameTopRedisGetSingleUserRangeRankInfo(uid string, gtid string, gid stri
result
[
key
]
=
value
result
[
key
]
=
value
}
}
//result 为切片,储存了所有匹配到的特定值
//result 为切片,储存了所有匹配到的特定值
igt
[
i
/
2
]
.
NickName
=
result
[
0
]
//第一个为昵称
igt
[
s
]
.
NickName
=
result
[
0
]
//第一个为昵称
igt
[
i
/
2
]
.
HeadPortraitURL
=
result
[
1
]
//第二个为头像url
igt
[
s
]
.
HeadPortraitURL
=
result
[
1
]
//第二个为头像url
}
}
index
++
index
++
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment