|
@@ -46,10 +46,12 @@ func (s *StoreEntry) Login(ctx context.Context, req *pasturePb.SearchUserRequest
|
|
return nil, xerr.Customf("该账号已被删除,请联系管理员")
|
|
return nil, xerr.Customf("该账号已被删除,请联系管理员")
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ zaplog.Info("Login", zap.Any("systemUser", systemUser))
|
|
|
|
+
|
|
systemRoleList := make([]*model.SystemRole, 0)
|
|
systemRoleList := make([]*model.SystemRole, 0)
|
|
if err := s.DB.Model(new(model.SystemRole)).
|
|
if err := s.DB.Model(new(model.SystemRole)).
|
|
Where("is_show = ? and is_delete = ?", pasturePb.IsShow_Ok, pasturePb.IsShow_Ok).
|
|
Where("is_show = ? and is_delete = ?", pasturePb.IsShow_Ok, pasturePb.IsShow_Ok).
|
|
- Where("id IN ?", strings.Split(systemUser.RoleIds, ",")).
|
|
|
|
|
|
+ Where("id IN ?", systemUser.GetRoleIds()).
|
|
Find(&systemRoleList).Error; err != nil {
|
|
Find(&systemRoleList).Error; err != nil {
|
|
zaplog.Error("Login", zap.Any("systemRole", err))
|
|
zaplog.Error("Login", zap.Any("systemRole", err))
|
|
}
|
|
}
|