Commit 09bf6aab03644c50b299b2842705f9bacb2fca10
1 parent
0330a76b
111
Showing
1 changed file
with
6 additions
and
4 deletions
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarUserServiceImpl.java
| ... | ... | @@ -148,10 +148,12 @@ 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 | + if(loginDto.getSignin() != 1){ | |
| 152 | + nUser = this.getOne(qw); | |
| 153 | + if (Objects.isNull(nUser)) { | |
| 154 | + throw new UsernameNotFoundException("当前用户不存在!"); | |
| 155 | + } | |
| 156 | + } | |
| 155 | 157 | }else{ |
| 156 | 158 | // 验证码验证 |
| 157 | 159 | String code = redisCache.getCacheObject(GlobalRedisProperties.REDIS_USER_CODE.getValue() + loginDto.getTel()); | ... | ... |