master
shenzhuan 2 years ago
parent 2844033713
commit 992c1ca21d

@ -89,6 +89,9 @@ func GetRedisFromConsul(vip *viper.Viper) (red *redis.Client, err error) {
func SetUserToken(red *redis.Client, key string, val []byte, timeTTL time.Duration) {
red.Set(context.Background(), key, val, timeTTL)
}
func SetOrderToken(red *redis.Client, key string, val string, timeTTL time.Duration) {
red.Set(context.Background(), key, val, timeTTL)
}
// 获取用户登录信息
func GetUserToken(red *redis.Client, key string) string {

Loading…
Cancel
Save