Commit 0330a76ba19163a719f9af1a9d6c0435f2431f5a
1 parent
73dcbd9c
1
Showing
1 changed file
with
4 additions
and
0 deletions
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarUserServiceImpl.java
| ... | ... | @@ -148,6 +148,10 @@ public class GarUserServiceImpl extends ServiceImpl<GarUserMapper, GarUser> |
| 148 | 148 | if(loginDto.getCode() == null && loginDto.getPassword() != null){ |
| 149 | 149 | qw.lambda().eq(GarUser::getGarUserTel, loginDto.getTel()); |
| 150 | 150 | qw.lambda().eq(GarUser::getPassword, new BCryptPasswordEncoder().encode(loginDto.getPassword())); |
| 151 | + nUser = this.getOne(qw); | |
| 152 | + if (Objects.isNull(nUser)) { | |
| 153 | + throw new UsernameNotFoundException("当前用户不存在!"); | |
| 154 | + } | |
| 151 | 155 | }else{ |
| 152 | 156 | // 验证码验证 |
| 153 | 157 | String code = redisCache.getCacheObject(GlobalRedisProperties.REDIS_USER_CODE.getValue() + loginDto.getTel()); | ... | ... |