修改
This commit is contained in:
parent
da1f14b7dd
commit
5e9b3922a1
@ -2,6 +2,7 @@ package userBindService
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"game/common/proto/pb"
|
||||
"game/common/utils"
|
||||
@ -43,7 +44,9 @@ func (m *UserBindService) makeRedisKey(userId int64, typeId pb.ServiceTypeId) st
|
||||
func (m *UserBindService) LoadFromRedis(userId int64, typeId pb.ServiceTypeId) string {
|
||||
k := m.makeRedisKey(userId, typeId)
|
||||
if sName, err := m.rdb.Get(context.Background(), k).Result(); err != nil {
|
||||
log.Error(err.Error())
|
||||
if !errors.Is(err, redis.Nil) {
|
||||
log.Error(err.Error())
|
||||
}
|
||||
return ""
|
||||
} else {
|
||||
return sName
|
||||
|
Loading…
x
Reference in New Issue
Block a user