|
@@ -29,10 +29,8 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserInfoMapper, Admin
|
|
|
queryWrapper.eq(AdminUserInfo::getAccount, account);
|
|
|
queryWrapper.eq(AdminUserInfo::getIsDeleted, BasePO.DeleteFlag.NOT_DELETED);
|
|
|
AdminUserInfo userInfo = this.baseMapper.selectOne(queryWrapper);
|
|
|
- if (Objects.nonNull(userInfo)) {
|
|
|
- if (PasswordUtil.matches(password, userInfo.getPassword())) {
|
|
|
- return userInfo;
|
|
|
- }
|
|
|
+ if (Objects.nonNull(userInfo) && PasswordUtil.matches(password, userInfo.getPassword())) {
|
|
|
+ return userInfo;
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
@@ -42,8 +40,7 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserInfoMapper, Admin
|
|
|
LambdaQueryWrapper<AdminUserInfo> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
queryWrapper.eq(AdminUserInfo::getPhone, phone);
|
|
|
queryWrapper.eq(AdminUserInfo::getIsDeleted, BasePO.DeleteFlag.NOT_DELETED);
|
|
|
- AdminUserInfo userInfo = this.baseMapper.selectOne(queryWrapper);
|
|
|
- return userInfo;
|
|
|
+ return this.baseMapper.selectOne(queryWrapper);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -51,8 +48,7 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserInfoMapper, Admin
|
|
|
LambdaQueryWrapper<AdminUserInfo> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
queryWrapper.eq(AdminUserInfo::getAccount, account);
|
|
|
queryWrapper.eq(AdminUserInfo::getIsDeleted, BasePO.DeleteFlag.NOT_DELETED);
|
|
|
- AdminUserInfo userInfo = this.baseMapper.selectOne(queryWrapper);
|
|
|
- return userInfo;
|
|
|
+ return this.baseMapper.selectOne(queryWrapper);
|
|
|
}
|
|
|
|
|
|
@Override
|