|
@@ -219,11 +219,11 @@ public class UserController extends ControllerSupport {
|
|
|
private Long insertOrUpdateUser(UserForm userForm) {
|
|
|
cn.com.qmth.examcloud.commons.web.security.bean.User accessUser = getAccessUser();
|
|
|
Long rootOrgId = userForm.getRootOrgId();
|
|
|
- Org org = orgRepo.findOne(rootOrgId);
|
|
|
- if (null == org) {
|
|
|
+ Org rootOrg = orgRepo.findOne(rootOrgId);
|
|
|
+ if (null == rootOrg) {
|
|
|
throw new StatusException("B-150003", "机构不存在");
|
|
|
}
|
|
|
- if (0 != org.getParentId()) {
|
|
|
+ if (null != rootOrg.getParentId()) {
|
|
|
throw new StatusException("B-150004", "机构错误");
|
|
|
}
|
|
|
|