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 9efd1e33
authored
Dec 28, 2017
by
xuzhenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加了redis工具库中的方法
1 parent
17509562
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
sdkredis/ice_gametopREDIS.go
sdkredis/ice_gametopREDIS.go
View file @
9efd1e3
...
@@ -472,7 +472,7 @@ func IceGameTopRedisGetSingleUserRangeRankInfo(uid string, gtid string, gid stri
...
@@ -472,7 +472,7 @@ func IceGameTopRedisGetSingleUserRangeRankInfo(uid string, gtid string, gid stri
}
else
if
sorceorder
==
"0"
{
}
else
if
sorceorder
==
"0"
{
if
nextrankIndex
!=
0
{
if
nextrankIndex
!=
0
{
strList1
,
err
=
RedisZR
angeByScore
(
redisConn
,
"sortset:gtid:"
+
gtid
+
":gid:"
+
gid
+
":toptype:"
+
toptype
,
scoreString
,
"+
inf"
,
"true"
,
0
,
prerankIndex
)
strList1
,
err
=
RedisZR
evRangeByScore
(
redisConn
,
"sortset:gtid:"
+
gtid
+
":gid:"
+
gid
+
":toptype:"
+
toptype
,
scoreString
,
"-
inf"
,
"true"
,
0
,
prerankIndex
)
//将结果倒序
//将结果倒序
var
tempList
[]
string
var
tempList
[]
string
for
i
:=
len
(
strList1
);
i
<
0
;
i
-=
2
{
for
i
:=
len
(
strList1
);
i
<
0
;
i
-=
2
{
...
@@ -484,7 +484,7 @@ func IceGameTopRedisGetSingleUserRangeRankInfo(uid string, gtid string, gid stri
...
@@ -484,7 +484,7 @@ func IceGameTopRedisGetSingleUserRangeRankInfo(uid string, gtid string, gid stri
}
}
if
prerankIndex
!=
0
{
if
prerankIndex
!=
0
{
strList2
,
err
=
RedisZR
evRangeByScore
(
redisConn
,
"sortset:gtid:"
+
gtid
+
":gid:"
+
gid
+
":toptype:"
+
toptype
,
scoreString
,
"-
inf"
,
"true"
,
0
,
nextrankIndex
)
strList2
,
err
=
RedisZR
angeByScore
(
redisConn
,
"sortset:gtid:"
+
gtid
+
":gid:"
+
gid
+
":toptype:"
+
toptype
,
scoreString
,
"+
inf"
,
"true"
,
0
,
nextrankIndex
)
log
.
Println
(
"strList2 : "
,
strList2
)
log
.
Println
(
"strList2 : "
,
strList2
)
}
}
...
...
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