Commit c8c99675c63aaf8e011eba4009e386d8d3fef753

Authored by xp.Huang
1 parent 52307bc3

perf: 移除不必要的代码

@@ -133,9 +133,8 @@ public class RestAuthenticationProvider implements AuthenticationProvider { @@ -133,9 +133,8 @@ public class RestAuthenticationProvider implements AuthenticationProvider {
133 } 133 }
134 } 134 }
135 else { 135 else {
136 - try {  
137 - tkDetailDTO = ytUserDetailsByUserName(ytUserName.split("@")[0], password).get();  
138 - }catch (Exception e){} 136 + //解决tk页面输入邮箱登录的异常
  137 + tkDetailDTO = ytUserDetailsByUserName(ytUserName.split("@")[0], password).get();
139 } 138 }
140 securityUser = authenticateByUsernameAndPassword(authentication, userPrincipal, username, password,tkDetailDTO); 139 securityUser = authenticateByUsernameAndPassword(authentication, userPrincipal, username, password,tkDetailDTO);
141 if (twoFactorAuthService.isTwoFaEnabled(securityUser.getTenantId(), securityUser.getId())) { 140 if (twoFactorAuthService.isTwoFaEnabled(securityUser.getTenantId(), securityUser.getId())) {
@@ -238,9 +238,6 @@ public class SysUserServiceImpl extends AbstractBaseService<UserMapper, SysUserE @@ -238,9 +238,6 @@ public class SysUserServiceImpl extends AbstractBaseService<UserMapper, SysUserE
238 @Override 238 @Override
239 public UserInfoDTO me(String userId, String tenantId, Set<String> currentRoles) { 239 public UserInfoDTO me(String userId, String tenantId, Set<String> currentRoles) {
240 SysUserEntity user = baseMapper.selectById(userId); 240 SysUserEntity user = baseMapper.selectById(userId);
241 -// if(user==null){  
242 -// throw new TkDataValidationException(MessageUtils.message(ErrorMessage.USER_NOT_EXISTS.getI18nCode()));  
243 -// }  
244 UserInfoDTO userInfoDTO = new UserInfoDTO(); 241 UserInfoDTO userInfoDTO = new UserInfoDTO();
245 if (!accountProperties.getReset() || !StringUtils.isEmpty(user.getActivateToken())) { 242 if (!accountProperties.getReset() || !StringUtils.isEmpty(user.getActivateToken())) {
246 userInfoDTO.setNeedSetPwd(false); 243 userInfoDTO.setNeedSetPwd(false);