Commit 0d712eee by xuzhenhao

增加了redis工具库中的方法

1 parent 0a8a520f
Showing with 4 additions and 4 deletions
...@@ -231,11 +231,11 @@ func RedisZRangeByScore(conn redis.Conn, key string, startScore string, endScore ...@@ -231,11 +231,11 @@ func RedisZRangeByScore(conn redis.Conn, key string, startScore string, endScore
if limit == "true" { if limit == "true" {
res, err := RedisCommand(conn, "zrangebyscore", key, startScore, endScore, "withscore", "limit", limitStart, limitEnd) res, err := RedisCommand(conn, "zrangebyscore", key, startScore, endScore, "withscore", "limit", limitStart, limitEnd)
reply, _ = redis.Strings(res, nil) reply, _ = redis.Strings(res, nil)
return return reply, err
} }
res, err := RedisCommand(conn, "zrangebyscore", key, startScore, endScore, "withscore") res, err := RedisCommand(conn, "zrangebyscore", key, startScore, endScore, "withscore")
reply, _ = redis.Strings(res, nil) reply, _ = redis.Strings(res, nil)
return return reply, err
} }
/* /*
...@@ -245,11 +245,11 @@ func RedisZRevRangeByScore(conn redis.Conn, key string, startScore string, endSc ...@@ -245,11 +245,11 @@ func RedisZRevRangeByScore(conn redis.Conn, key string, startScore string, endSc
if limit == "true" { if limit == "true" {
res, err := RedisCommand(conn, "zrevrangebyscore", key, startScore, endScore, "withscore", "limit", limitStart, limitEnd) res, err := RedisCommand(conn, "zrevrangebyscore", key, startScore, endScore, "withscore", "limit", limitStart, limitEnd)
reply, _ = redis.Strings(res, nil) reply, _ = redis.Strings(res, nil)
return return reply, err
} }
res, err := RedisCommand(conn, "zrevrangebyscore", key, startScore, endScore, "withscore") res, err := RedisCommand(conn, "zrevrangebyscore", key, startScore, endScore, "withscore")
reply, _ = redis.Strings(res, nil) reply, _ = redis.Strings(res, nil)
return return reply, err
} }
/* /*
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!