|
|
@@ -155,7 +155,11 @@ public class SysOrgController extends BaseController {
|
|
|
*/
|
|
|
@GetMapping("/getUpOrgs/{orgId}")
|
|
|
public List<Long> getUpOrgs(@PathVariable("orgId") Long orgId) {
|
|
|
- String path = sysOrgMapper.selectById(orgId).getPath();
|
|
|
+ SysOrg org=sysOrgMapper.selectById(orgId);
|
|
|
+ if(ObjectUtil.isNull(org)){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ String path = org.getPath();
|
|
|
if (ObjectUtil.isEmpty(path)) {
|
|
|
return new ArrayList<>();
|
|
|
}
|
|
|
@@ -173,8 +177,8 @@ public class SysOrgController extends BaseController {
|
|
|
* @param ids
|
|
|
* @return
|
|
|
*/
|
|
|
- @GetMapping("/getParentNames")
|
|
|
- public List<IdNameVo> getParentName(List<Long> ids) {
|
|
|
- return sysOrgMapper.getParentName(ids);
|
|
|
+ @PostMapping("/getParentNames")
|
|
|
+ public R<List<IdNameVo>> getParentName(@RequestBody List<Long> ids) {
|
|
|
+ return R.ok(sysOrgMapper.getParentName(ids));
|
|
|
}
|
|
|
}
|