feat:优化项目信息
This commit is contained in:
@ -99,7 +99,7 @@ func (c *Instance) SwitchIdentity(identity int) error {
|
||||
if c.SelectIdentity == identity {
|
||||
return nil
|
||||
}
|
||||
c.TenantID, c.ManageUID = 0, 0
|
||||
c.ManageUID = 0
|
||||
// 已存在相应的身份,更新最后
|
||||
if c.Identity&identity > 0 {
|
||||
mUserManage := model.NewUserManage()
|
||||
@ -125,12 +125,12 @@ func (c *Instance) SwitchIdentity(identity int) error {
|
||||
return err
|
||||
}
|
||||
}
|
||||
c.TenantID = mUserManage.TenantID
|
||||
c.ManageUID = mUserManage.UUID
|
||||
c.SelectIdentity = identity
|
||||
service.Publish(config2.EventForAccountLoginProduce, config2.RedisKeyForAccount, c.UIDToString(), c.Enterprise)
|
||||
return nil
|
||||
}
|
||||
c.SelectIdentity = identity
|
||||
service.Publish(config2.EventForAccountLoginProduce, config2.RedisKeyForAccount, c.UIDToString(), c.Enterprise)
|
||||
return nil
|
||||
return errors.New("操作错误,无效的身份信息")
|
||||
}
|
||||
|
||||
func NewInstance() InstanceHandle {
|
||||
|
Reference in New Issue
Block a user