fuliqi
2024-11-26 571ce3330d9f90468243e202d42416e63c143f75
项目库接口路径
1个文件已修改
16 ■■■■ 已修改文件
business/src/main/java/com/ycl/controller/ProjectInfoController.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
business/src/main/java/com/ycl/controller/ProjectInfoController.java
@@ -26,55 +26,55 @@
@RequiredArgsConstructor
@Api(value = "项目管理基础信息表", tags = "项目管理基础信息表管理")
@RestController
@RequestMapping("/api/project-info")
@RequestMapping("/project/info")
public class ProjectInfoController {
    private final ProjectInfoService projectInfoService;
    @PostMapping
    @ApiOperation(value = "添加", notes = "添加")
    @PreAuthorize("hasAuthority('projectInfo:add')")
//    @PreAuthorize("hasAuthority('projectInfo:add')")
    public Result add(@RequestBody @Validated(Add.class) ProjectInfoForm form) {
        return projectInfoService.add(form);
    }
    @PutMapping
    @ApiOperation(value = "修改", notes = "修改")
    @PreAuthorize("hasAuthority('projectInfo:edit')")
//    @PreAuthorize("hasAuthority('projectInfo:edit')")
    public Result update(@RequestBody @Validated(Update.class) ProjectInfoForm form) {
        return projectInfoService.update(form);
    }
    @DeleteMapping("/{id}")
    @ApiOperation(value = "ID删除", notes = "ID删除")
    @PreAuthorize("hasAuthority('projectInfo:del')")
//    @PreAuthorize("hasAuthority('projectInfo:del')")
    public Result removeById(@PathVariable("id") String id) {
        return projectInfoService.removeById(id);
    }
    @DeleteMapping("/batch")
    @ApiOperation(value = "批量删除", notes = "批量删除")
    @PreAuthorize("hasAuthority('projectInfo:del:batch')")
//    @PreAuthorize("hasAuthority('projectInfo:del:batch')")
    public Result remove(@RequestBody @NotEmpty(message = "请选择数据") List<String> ids) {
        return projectInfoService.remove(ids);
    }
    @GetMapping("/page")
    @ApiOperation(value = "分页", notes = "分页")
    @PreAuthorize("hasAuthority('projectInfo:page')")
//    @PreAuthorize("hasAuthority('projectInfo:page')")
    public Result page(ProjectInfoQuery query) {
        return projectInfoService.page(query);
    }
    @GetMapping("/{id}")
    @ApiOperation(value = "详情", notes = "详情")
    @PreAuthorize("hasAuthority('projectInfo:detail')")
//    @PreAuthorize("hasAuthority('projectInfo:detail')")
    public Result detail(@PathVariable("id") Integer id) {
        return projectInfoService.detail(id);
    }
    @GetMapping("/list")
    @PreAuthorize("hasAuthority('projectInfo:list')")
//    @PreAuthorize("hasAuthority('projectInfo:list')")
    @ApiOperation(value = "列表", notes = "列表")
    public Result list() {
        return projectInfoService.all();