This commit is contained in:
aozhiwei 2024-05-25 10:55:10 +08:00
parent ddc41fd55b
commit 7edbb6eafb
3 changed files with 25 additions and 2 deletions

View File

@ -1,8 +1,7 @@
package controller
import (
"q5"
"f5"
"main/session"
"github.com/gin-gonic/gin"
)
@ -13,4 +12,13 @@ type Stat struct {
func (this *Stat) caUpdateSession(c *gin.Context) {
accountId := c.DefaultQuery("account_id", "")
sessionId := c.DefaultQuery("session_id", "")
session.SessionMgr.UpdateSession(accountId, sessionId);
rspObj := struct {
ErrCode int32 `json:"errcode"`
ErrMsg string `json:"errmsg"`
}{
ErrCode: 0,
ErrMsg: "",
}
c.JSON(200, rspObj)
}

View File

@ -0,0 +1,3 @@
package session
var SessionMgr = new (sessionMgr)

View File

@ -0,0 +1,12 @@
package session
import (
"sync"
)
type sessionMgr struct {
idHash sync.Map
}
func (this *sessionMgr) UpdateSession(accountId string, sessionId string) {
}