Explorar o código

整理数据权限

wangliang %!s(int64=3) %!d(string=hai) anos
pai
achega
bf12fabe74

+ 3 - 6
distributed-print/src/main/java/com/qmth/distributed/print/api/SysOrgController.java

@@ -47,8 +47,7 @@ public class SysOrgController {
     @ApiOperation(value = "查询")
     @RequestMapping(value = "/list", method = RequestMethod.POST)
     public Result list() {
-        List<OrgDto> orgDtoList = sysOrgService.listOrgTree();
-        return ResultUtil.ok(orgDtoList);
+        return ResultUtil.ok(sysOrgService.listOrgTree());
     }
 
     /**
@@ -75,8 +74,7 @@ public class SysOrgController {
     @ApiOperation(value = "启用/禁用")
     @RequestMapping(value = "/enable", method = RequestMethod.POST)
     public Result enable(@RequestBody SysOrg org) {
-        boolean isSuccess = printCommonService.enable(org);
-        return ResultUtil.ok(isSuccess);
+        return ResultUtil.ok(printCommonService.enable(org));
     }
 
     /**
@@ -88,8 +86,7 @@ public class SysOrgController {
     @ApiOperation(value = "删除")
     @RequestMapping(value = "/remove", method = RequestMethod.POST)
     public Result remove(@RequestBody SysOrg org) {
-        boolean isSuccess = printCommonService.remove(org.getId());
-        return ResultUtil.ok(isSuccess);
+        return ResultUtil.ok(printCommonService.sysOrgRemove(org.getId()));
     }
 
 }