|
@@ -7,8 +7,6 @@ import (
|
|
|
"server/msg"
|
|
|
"strconv"
|
|
|
|
|
|
- "encoding/base64"
|
|
|
-
|
|
|
"github.com/gomodule/redigo/redis"
|
|
|
"github.com/name5566/leaf/log"
|
|
|
)
|
|
@@ -98,9 +96,9 @@ func GetUserIDFromRedisByAP(account string, password string) (string, error) {
|
|
|
defer conn.Close()
|
|
|
str := account + "," + password
|
|
|
// 将字符串转换为字节切片
|
|
|
- data := []byte(str)
|
|
|
- encoded := base64.StdEncoding.EncodeToString(data)
|
|
|
- userId, err := redis.String(conn.Do("HGET", encoded, "data"))
|
|
|
+ // data := []byte(str)
|
|
|
+ // encoded := base64.StdEncoding.EncodeToString(data)
|
|
|
+ userId, err := redis.String(conn.Do("HGET", str, "data"))
|
|
|
|
|
|
if err == redis.ErrNil {
|
|
|
// 如果 Redis 中没有数据
|