This commit is contained in:
@@ -73,7 +73,6 @@ func (c *BaseSysUserController) GetSession(ctx context.Context, req *SessionReq)
|
||||
|
||||
res.Session = blazing.NewInfoService(uint32(t.UserId)).Gensession()
|
||||
|
||||
cool.CacheManager.Set(context.Background(), fmt.Sprintf("session:%d", uint32(t1.ID)), res.Session, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"blazing/modules/player/model"
|
||||
"context"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
|
||||
"strings"
|
||||
|
||||
@@ -151,6 +152,7 @@ func (s *InfoService) Gensession() string {
|
||||
|
||||
sessionID := hex.EncodeToString(uuidBytes)
|
||||
|
||||
cool.CacheManager.Set(context.Background(), fmt.Sprintf("session:%d", uint32(s.userid)), uuidStr, 10*time.Minute)
|
||||
// ///User.Store(string(uuidStr), uint32(s.userid))
|
||||
// //share.ShareManager.SaveSession(string(uuidStr), uint32(s.userid))
|
||||
return sessionID
|
||||
|
||||
Reference in New Issue
Block a user