|
|
@@ -2,6 +2,7 @@ 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.IDParam;
|
|
|
import com.zhongshu.card.client.model.base.OidModel;
|
|
|
import com.zhongshu.card.client.model.org.DepartmentParam;
|
|
|
import com.zhongshu.card.client.ret.ResultContent;
|
|
|
@@ -23,7 +24,7 @@ public class DepartmentController {
|
|
|
private DepartmentService departmentService;
|
|
|
|
|
|
@ResourceAuth(value = "user",type = AuthType.User)
|
|
|
- @Operation(summary = "添加部门", description = "添加部门")
|
|
|
+ @Operation(summary = "添加-编辑部门", description = "添加-编辑部门")
|
|
|
@RequestMapping(value = "addDepartment", method = {RequestMethod.POST})
|
|
|
public ResultContent addDepartment(DepartmentParam param) {
|
|
|
return this.departmentService.addDepartment(param);
|
|
|
@@ -36,4 +37,11 @@ public class DepartmentController {
|
|
|
return this.departmentService.getDepartmentTree(param.getOid());
|
|
|
}
|
|
|
|
|
|
+ @ResourceAuth(value = "user",type = AuthType.User)
|
|
|
+ @Operation(summary = "删除部门", description = "删除部门")
|
|
|
+ @RequestMapping(value = "deleteDepartment", method = {RequestMethod.POST})
|
|
|
+ public ResultContent deleteDepartment(IDParam param) {
|
|
|
+ return this.departmentService.deleteDepartment(param.getId());
|
|
|
+ }
|
|
|
+
|
|
|
}
|