| 1234567891011121314151617 |
- package redisx
- import (
- "context"
- "github.com/redis/go-redis/v9"
- )
- // 有序集合封装
- func ZAdd(ctx context.Context, key string, members ...redis.Z) error {
- return getClient().ZAdd(ctx, key, members...).Err()
- }
- func ZRange(ctx context.Context, key string, start, stop int64) ([]string, error) {
- return getClient().ZRange(ctx, key, start, stop).Result()
- }
|