feat:完善信息
This commit is contained in:
@ -8,18 +8,19 @@ import (
|
||||
|
||||
type Logout struct {
|
||||
*service.SessionEnterprise
|
||||
local uint64
|
||||
}
|
||||
|
||||
type LogoutHandle func(enterprise *service.SessionEnterprise, local uint64) *Logout
|
||||
type LogoutHandle func(enterprise *service.SessionEnterprise) *Logout
|
||||
|
||||
func (c *Logout) Launch() error {
|
||||
service.Publish(config.EventForRedisHashDestroy, config.RedisKeyForAccount, utils.UintToString(c.UID))
|
||||
if c.UID > 0 {
|
||||
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}
|
||||
return func(enterprise *service.SessionEnterprise) *Logout {
|
||||
return &Logout{enterprise}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user