|
|
@@ -48,14 +48,14 @@ public class AuthenticationController {
|
|
|
//List<UserQuestion> userQuestion = userQuestionService.findUserQuestionByUserUUOrderBySortAsc(sysUser.getUserUU());
|
|
|
User user = userService.findUserByUserUU(sysUser.getUserUU());
|
|
|
user.setEnterprise(sysUser.getEnterprise());
|
|
|
- try{
|
|
|
+ if (user.getEnterprise() != null ) {
|
|
|
if (user.getEnterprise().getEnAdminuu().equals(user.getUserUU())) {
|
|
|
user.setIssys(Constant.YES);
|
|
|
}
|
|
|
else {
|
|
|
user.setIssys(Constant.NO);
|
|
|
}
|
|
|
- } catch (NullPointerException e) { }
|
|
|
+ }
|
|
|
request.getSession().setAttribute("user",user);
|
|
|
UserInfo userInfo = new UserInfo(user);
|
|
|
Integer hasQuestion = user.getHasQuestion();
|
|
|
@@ -64,7 +64,9 @@ public class AuthenticationController {
|
|
|
userInfo.setSecLevel((short) (1 + userInfo.getSecLevel()));
|
|
|
}
|
|
|
//初始化权限
|
|
|
- roleService.initEnterprise(sysUser.getEnterprise().getUu());
|
|
|
+ if (sysUser.getEnterprise() != null) {
|
|
|
+ roleService.initEnterprise(sysUser.getEnterprise().getUu());
|
|
|
+ }
|
|
|
return userInfo;
|
|
|
}
|
|
|
|