feat:完善信息
This commit is contained in:
25
app/api/enterprise/controller/account/logout.go
Normal file
25
app/api/enterprise/controller/account/logout.go
Normal file
@ -0,0 +1,25 @@
|
||||
package account
|
||||
|
||||
import (
|
||||
"SciencesServer/app/service"
|
||||
"SciencesServer/config"
|
||||
"SciencesServer/utils"
|
||||
)
|
||||
|
||||
type Logout struct {
|
||||
*service.SessionEnterprise
|
||||
local uint64
|
||||
}
|
||||
|
||||
type LogoutHandle func(enterprise *service.SessionEnterprise, local uint64) *Logout
|
||||
|
||||
func (c *Logout) Launch() error {
|
||||
service.Publish(config.EventForRedisHashDestroy, config.RedisKeyForAccount, utils.UintToString(c.UID))
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewLogout() LogoutHandle {
|
||||
return func(enterprise *service.SessionEnterprise, local uint64) *Logout {
|
||||
return &Logout{enterprise, local}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user