feat:完善信息
This commit is contained in:
22
app/enterprise/controller/account/logout.go
Normal file
22
app/enterprise/controller/account/logout.go
Normal file
@ -0,0 +1,22 @@
|
||||
package account
|
||||
|
||||
import (
|
||||
"SciencesServer/app/service"
|
||||
"SciencesServer/config"
|
||||
"SciencesServer/utils"
|
||||
)
|
||||
|
||||
type Logout struct{ *service.SessionEnterprise }
|
||||
|
||||
type LogoutHandle func(*service.SessionEnterprise) *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) *Logout {
|
||||
return &Logout{enterprise}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user