You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
455 B
22 lines
455 B
package dao |
|
|
|
import ( |
|
"context" |
|
|
|
"go-common/library/cache/redis" |
|
"go-common/library/log" |
|
) |
|
|
|
//IsWhietListUID 通过UID判读是否是白名单用户 |
|
func (d *Dao) IsWhietListUID(ctx context.Context, key string) (isWhite bool) { |
|
conn := d.whitelistredis.Get(ctx) |
|
defer conn.Close() |
|
|
|
var err error |
|
isWhite, err = redis.Bool(conn.Do("EXISTS", key)) |
|
if err != nil { |
|
log.Error("[DM] GetWhietListByUID redis err:%+v", err) |
|
return true |
|
} |
|
return |
|
}
|
|
|