This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"blazing/cool"
|
||||
|
||||
@@ -71,24 +70,10 @@ func (c *BaseSysUserController) GetSession(ctx context.Context, req *SessionReq)
|
||||
res.PetID = dict.NewDictInfoService().GetShiny()
|
||||
res.Server = config.NewServerService().GetPort(int(t1.Debug))
|
||||
// share.ShareManager.DeleteSession(t1)
|
||||
ser := playerservice.NewUserService(uint32(t1.ID))
|
||||
|
||||
res.Session = blazing.NewInfoService(uint32(t.UserId)).Gensession()
|
||||
defer func() {
|
||||
kickErr := ser.Info.Kick(uint32(t1.ID))
|
||||
if kickErr != nil {
|
||||
fmt.Println("踢人失败", kickErr)
|
||||
|
||||
}
|
||||
logininfo := ser.Info.SetLogin()
|
||||
if logininfo != nil {
|
||||
|
||||
cool.CacheManager.Set(context.Background(), fmt.Sprintf("session:%d", uint32(t1.ID)), res.Session, 0)
|
||||
cool.CacheManager.Set(context.TODO(), fmt.Sprintf("player:%d", uint32(t1.ID)), logininfo, 10*time.Minute)
|
||||
|
||||
}
|
||||
}()
|
||||
|
||||
cool.CacheManager.Set(context.Background(), fmt.Sprintf("session:%d", uint32(t1.ID)), res.Session, 0)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user