Commit d41b1dd0 authored by 唐峰's avatar 唐峰

金融token校验无效的空指针问题

parent 954d7f48
......@@ -572,6 +572,10 @@ public class UserController implements IBaseController {
return JsonResult.buildSuccessResult(null, result);
}
}
if (sessionStruct.getValues() == null || sessionStruct.getValues().getUser() == null ) {
log.info("当前token对应的用户不存在,入参tenantId:{},token:{}", tenantId, token);
return JsonResult.buildSuccessResult(null, result);
}
User user = sessionStruct.getValues().getUser();
if (user.getTenantId() == null || !user.getEnable()) {
log.info("当前token对应的用户非当前租户,userId:{},用户tenantId:{},入参tenantId:{},token:{}", user.getId(), user.getTenantId(), tenantId, token);
......@@ -579,6 +583,7 @@ public class UserController implements IBaseController {
}
String phoneNo = user.getPhoneNo();
result.put("phoneNo", phoneNo);
result.put("userId", user.getId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment