|
|
@@ -2,12 +2,14 @@ package com.zhongshu.card.server.core.controller.org;
|
|
|
|
|
|
import com.github.microservice.auth.security.annotations.ResourceAuth;
|
|
|
import com.github.microservice.auth.security.type.AuthType;
|
|
|
+import com.zhongshu.card.client.model.base.OidModel;
|
|
|
import com.zhongshu.card.client.model.org.DepartmentParam;
|
|
|
import com.zhongshu.card.client.ret.ResultContent;
|
|
|
import com.zhongshu.card.client.service.org.DepartmentService;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
@@ -27,6 +29,11 @@ public class DepartmentController {
|
|
|
return this.departmentService.addDepartment(param);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ @ResourceAuth(value = "user",type = AuthType.User)
|
|
|
+ @Operation(summary = "得到机构部门树", description = "得到机构部门树")
|
|
|
+ @RequestMapping(value = "getDepartmentTree", method = {RequestMethod.POST})
|
|
|
+ public ResultContent getDepartmentTree(@RequestBody OidModel param) {
|
|
|
+ return this.departmentService.getDepartmentTree(param.getOid());
|
|
|
+ }
|
|
|
|
|
|
}
|