fix(UserVerifyController): 防止组织机构为空时出现空指针异常
在获取用户验证信息时,增加对组织机构对象的空值判断,避免当组织机构不存在时调用其方法导致空指针异常。
This commit is contained in:
@@ -79,8 +79,10 @@ public class UserVerifyController extends BaseController {
|
||||
final UserVerify one = userVerifyService.getOne(wrapper);
|
||||
if(ObjUtil.isNotEmpty(one) && one.getOrganizationId() > 0){
|
||||
final Organization organization = organizationService.getById(one.getOrganizationId());
|
||||
if(organization != null){
|
||||
one.setOrganizationName(organization.getOrganizationName());
|
||||
}
|
||||
}
|
||||
return success(one);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user