|
@@ -8,6 +8,7 @@ import cn.cslg.pas.common.utils.CacheUtils;
|
|
import cn.cslg.pas.common.utils.Response;
|
|
import cn.cslg.pas.common.utils.Response;
|
|
import cn.cslg.pas.common.utils.SecurityUtils.LoginUtils;
|
|
import cn.cslg.pas.common.utils.SecurityUtils.LoginUtils;
|
|
import cn.cslg.pas.common.utils.StringUtils;
|
|
import cn.cslg.pas.common.utils.StringUtils;
|
|
|
|
+import cn.cslg.pas.common.utils.auth.checkAuth;
|
|
import cn.cslg.pas.service.ProjectFieldService;
|
|
import cn.cslg.pas.service.ProjectFieldService;
|
|
import cn.cslg.pas.domain.ProjectField;
|
|
import cn.cslg.pas.domain.ProjectField;
|
|
import cn.cslg.pas.common.model.vo.ProjectFieldVO;
|
|
import cn.cslg.pas.common.model.vo.ProjectFieldVO;
|
|
@@ -37,28 +38,28 @@ public class ProjectFieldController {
|
|
private final ProjectFieldService projectFieldService;
|
|
private final ProjectFieldService projectFieldService;
|
|
private final CacheUtils cacheUtils;
|
|
private final CacheUtils cacheUtils;
|
|
private final LoginUtils loginUtils;
|
|
private final LoginUtils loginUtils;
|
|
-
|
|
|
|
|
|
+ @checkAuth(FunId = "/workspace/common/customField/check")
|
|
@GetMapping("list")
|
|
@GetMapping("list")
|
|
@Operation(summary = "自定义字段列表")
|
|
@Operation(summary = "自定义字段列表")
|
|
public String getPageList(ProjectFieldVO params) {
|
|
public String getPageList(ProjectFieldVO params) {
|
|
return Response.success(projectFieldService.getPageList(params));
|
|
return Response.success(projectFieldService.getPageList(params));
|
|
}
|
|
}
|
|
|
|
|
|
- @Permission(roles = {1, 2})
|
|
|
|
|
|
+ @checkAuth(FunId = "/workspace/common/customField/add")
|
|
@PostMapping("add")
|
|
@PostMapping("add")
|
|
@Operation(summary = "新增自定义字段")
|
|
@Operation(summary = "新增自定义字段")
|
|
public String add(@RequestBody ProjectField projectField) {
|
|
public String add(@RequestBody ProjectField projectField) {
|
|
return projectFieldService.add(projectField);
|
|
return projectFieldService.add(projectField);
|
|
}
|
|
}
|
|
|
|
|
|
- @Permission(roles = {1, 2})
|
|
|
|
|
|
+ @checkAuth(FunId = "/workspace/common/customField/modify")
|
|
@PostMapping("edit")
|
|
@PostMapping("edit")
|
|
@Operation(summary = "编辑自定义字段")
|
|
@Operation(summary = "编辑自定义字段")
|
|
public String edit(@RequestBody ProjectField projectField) {
|
|
public String edit(@RequestBody ProjectField projectField) {
|
|
return projectFieldService.edit(projectField);
|
|
return projectFieldService.edit(projectField);
|
|
}
|
|
}
|
|
|
|
|
|
- @Permission(roles = {1, 2})
|
|
|
|
|
|
+ @checkAuth(FunId = "/workspace/common/customField/delete")
|
|
@PostMapping("delete")
|
|
@PostMapping("delete")
|
|
@Operation(summary = "删除自定义字段")
|
|
@Operation(summary = "删除自定义字段")
|
|
public String delete(Integer id) {
|
|
public String delete(Integer id) {
|
|
@@ -83,7 +84,7 @@ public class ProjectFieldController {
|
|
return Response.success(projectFieldService.getProjectCustomField(projectId));
|
|
return Response.success(projectFieldService.getProjectCustomField(projectId));
|
|
}
|
|
}
|
|
|
|
|
|
- @Permission(roles = {1, 2})
|
|
|
|
|
|
+ @checkAuth(FunId = "/workspace/common/customField/import")
|
|
@PostMapping("import")
|
|
@PostMapping("import")
|
|
@Operation(summary = "从一个专题库导入一个自定义字段")
|
|
@Operation(summary = "从一个专题库导入一个自定义字段")
|
|
public String importProjectField(String id, Integer projectId) {
|
|
public String importProjectField(String id, Integer projectId) {
|
|
@@ -91,7 +92,7 @@ public class ProjectFieldController {
|
|
return Response.success(true);
|
|
return Response.success(true);
|
|
}
|
|
}
|
|
|
|
|
|
- @Permission(roles = {1, 2})
|
|
|
|
|
|
+ @checkAuth(FunId = "/workspace/common/customField/copy")
|
|
@PostMapping("copy")
|
|
@PostMapping("copy")
|
|
@Operation(summary = "将自定义字段复制到一个专题库中")
|
|
@Operation(summary = "将自定义字段复制到一个专题库中")
|
|
public String copyProjectField(Integer id, String projectId) {
|
|
public String copyProjectField(Integer id, String projectId) {
|