|
@@ -234,7 +234,7 @@ public class OrgController extends ControllerSupport {
|
|
|
@ApiOperation(value = "更新顶级机构", notes = "更新")
|
|
|
@PutMapping("updateRootOrg")
|
|
|
public Org updateRootOrg(@RequestBody Org org) {
|
|
|
-
|
|
|
+ trim(org);
|
|
|
if (!isSuperAdmin()) {
|
|
|
throw new StatusException("B-140001", "非法访问");
|
|
|
}
|
|
@@ -255,7 +255,8 @@ public class OrgController extends ControllerSupport {
|
|
|
@ApiOperation(value = "新增子机构", notes = "新增")
|
|
|
@PostMapping("addSubOrg")
|
|
|
public Org addSubOrg(@RequestBody Org org) {
|
|
|
- cn.com.qmth.examcloud.commons.web.security.bean.User accessUser = getAccessUser();
|
|
|
+ trim(org);
|
|
|
+ User accessUser = getAccessUser();
|
|
|
org.setParentId(accessUser.getRootOrgId());
|
|
|
org.setRootId(accessUser.getRootOrgId());
|
|
|
Org saved = orgService.save(org);
|