|
|
@@ -1,7 +1,10 @@
|
|
|
package com.xunmei.system.controller;
|
|
|
|
|
|
|
|
|
+import com.xunmei.common.core.exception.ServiceException;
|
|
|
import com.xunmei.system.api.domain.SysArea;
|
|
|
+import com.xunmei.system.api.domain.SysOrg;
|
|
|
+import com.xunmei.system.mapper.SysOrgMapper;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
@@ -33,7 +36,8 @@ import com.xunmei.common.core.web.page.TableDataInfo;
|
|
|
public class SysAreaController extends BaseController {
|
|
|
@Autowired
|
|
|
private ISysAreaService sysAreaService;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private SysOrgMapper sysOrgMapper;
|
|
|
/**
|
|
|
* 查询【请填写功能名称】列表
|
|
|
*/
|
|
|
@@ -62,6 +66,10 @@ public class SysAreaController extends BaseController {
|
|
|
@RequiresPermissions("system:area:query")
|
|
|
@GetMapping("/getAreaByOrg/{orgId}")
|
|
|
public AjaxResult getAreaByOrg(@PathVariable("orgId") Long orgId) {
|
|
|
+ SysOrg sysOrg = sysOrgMapper.selectSysOrgById(orgId);
|
|
|
+ if (null==sysOrg.getType()){
|
|
|
+ return error("该机构没有机构类型,请维护!");
|
|
|
+ }
|
|
|
return success(sysAreaService.getAreaByOrg(orgId));
|
|
|
}
|
|
|
/**
|