|
|
@ -207,5 +207,24 @@ func ZScore(key string, member interface{}) (float64, error) { |
|
|
|
} else { |
|
|
|
return redisdb.Float64(reply, nil) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
|
|
* 指定成员的分数, 返回int64 |
|
|
|
* key 域 |
|
|
|
* member 成员 |
|
|
|
*/ |
|
|
|
func ZScoreInt64(key string, member interface{}) (int64, error) { |
|
|
|
c := GetConn() |
|
|
|
|
|
|
|
reply, err := c.Do("ZSCORE", key, member) |
|
|
|
|
|
|
|
CloseConn(c) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
return 0, err |
|
|
|
} else { |
|
|
|
return redisdb.Int64(reply, nil) |
|
|
|
} |
|
|
|
|
|
|
|
} |