feat:优化项目信息

This commit is contained in:
henry
2021-12-01 11:31:55 +08:00
parent edb9253c86
commit c27e115517
21 changed files with 203 additions and 28 deletions

View File

@ -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 {