解决空指针问题

This commit is contained in:
kuang.yife 2023-12-11 20:49:06 +08:00
parent a50b9fcfcf
commit c3924dacb2
1 changed files with 3 additions and 1 deletions

View File

@ -65,8 +65,10 @@ public class LoginServiceImpl implements LoginService {
resp.setUserId(tbUser.getId());
// 用户存在,如果已填充用户信息
TbUserSingle tbUserSingle = tbUserSingleService.lambdaQuery().eq(TbUserSingle::getUserId, tbUser.getId()).one();
if(tbUserSingle != null){
BeanUtils.copyProperties(tbUserSingle, resp);
}
}
return resp;
}