Merge pull request 'by Robin at 20240613' (#531) from feat-IRONFANS-122-Robin into test
Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/531
This commit is contained in:
commit
136f96fdf5
|
@ -82,12 +82,14 @@ func (s *Service) ApiLoginByPswd(ctx *gin.Context, req *loginproto.ApiLoginByPsw
|
|||
}
|
||||
|
||||
// 2.让已登录的用户强制下线
|
||||
if util.DerefInt64(login.IsLogined) == 1 {
|
||||
if _, ec = s.ApiLogout(ctx, &loginproto.ApiLogoutReq{
|
||||
Mid: account.Mid,
|
||||
}); ec != errcode.ErrCodeLoginSrvOk {
|
||||
logger.Error("ApiLogout failed!")
|
||||
return
|
||||
if account.GetRole() == consts.User {
|
||||
if util.DerefInt64(login.IsLogined) == 1 {
|
||||
if _, ec = s.ApiLogout(ctx, &loginproto.ApiLogoutReq{
|
||||
Mid: account.Mid,
|
||||
}); ec != errcode.ErrCodeLoginSrvOk {
|
||||
logger.Error("ApiLogout failed!")
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -157,12 +159,14 @@ func (s *Service) ApiLoginByVeriCode(ctx *gin.Context, req *loginproto.ApiLoginB
|
|||
}
|
||||
|
||||
// 4.让已登录的用户强制下线
|
||||
if util.DerefInt64(login.IsLogined) == 1 {
|
||||
if _, ec = s.ApiLogout(ctx, &loginproto.ApiLogoutReq{
|
||||
Mid: account.Mid,
|
||||
}); ec != errcode.ErrCodeLoginSrvOk {
|
||||
logger.Error("ApiLogout failed!")
|
||||
return
|
||||
if account.GetRole() == consts.User {
|
||||
if util.DerefInt64(login.IsLogined) == 1 {
|
||||
if _, ec = s.ApiLogout(ctx, &loginproto.ApiLogoutReq{
|
||||
Mid: account.Mid,
|
||||
}); ec != errcode.ErrCodeLoginSrvOk {
|
||||
logger.Error("ApiLogout failed!")
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue