1
This commit is contained in:
parent
cc26a2dd31
commit
a6200b2778
@ -38,7 +38,7 @@ type Player interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type PlayerMgr interface {
|
type PlayerMgr interface {
|
||||||
GetPlayerByAccountId() Player
|
GetPlayerByAccountId(string) Player
|
||||||
}
|
}
|
||||||
|
|
||||||
type Mail interface {
|
type Mail interface {
|
||||||
|
@ -25,8 +25,8 @@ func GetMailMgr() common.MailMgr {
|
|||||||
return mailMgr
|
return mailMgr
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetPlayerMgr() common.MailMgr {
|
func GetPlayerMgr() common.PlayerMgr {
|
||||||
return mailMgr
|
return playerMgr
|
||||||
}
|
}
|
||||||
|
|
||||||
func RegModule(idx int32, m q5.Module) {
|
func RegModule(idx int32, m q5.Module) {
|
||||||
|
@ -2,9 +2,17 @@ package middleware
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"f5"
|
. "main/global"
|
||||||
)
|
)
|
||||||
|
|
||||||
func CaAuth(c *gin.Context) {
|
func CaAuth(c *gin.Context) {
|
||||||
f5.GetSysLog().Info("CaAuth")
|
accountId := c.DefaultQuery("account_id", "")
|
||||||
|
//_ := c.DefaultQuery("session_id", "")
|
||||||
|
hum := GetPlayerMgr().GetPlayerByAccountId(accountId)
|
||||||
|
if hum == nil {
|
||||||
|
|
||||||
|
}
|
||||||
|
hum.Lock()
|
||||||
|
c.Next()
|
||||||
|
hum.UnLock()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user