zhangwencui
2 天以前 b30f4c40c77a940a2a749a676e901787f55040b0
src/main/java/com/ruoyi/projectManagement/controller/InfoController.java
@@ -11,6 +11,7 @@
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import jakarta.validation.Valid;
@@ -30,6 +31,8 @@
    private final InfoStageHandleService infoStageHandleService;
    @PostMapping("/save")
    @PreAuthorize("(#saveInfoVo.info.id == null && @ss.hasPermi('project:info:add')) || " +
            "(#saveInfoVo.info.id != null && @ss.hasPermi('project:info:edit'))")
    @Operation(summary = "保存")
    public AjaxResult save(@RequestBody @Valid SaveInfoVo saveInfoVo) {
        infoService.save(saveInfoVo);
@@ -37,6 +40,7 @@
    }
    @PostMapping("/updateStatus")
    @PreAuthorize("@ss.hasPermi('project:legacy:maintain')")
    @Operation(summary = "修改状态")
    public AjaxResult updateStatus(@RequestBody @Valid UpdateStateInfo updateStateInfo){
        infoService.updateStatus(updateStateInfo);
@@ -44,6 +48,7 @@
    }
    @PostMapping("/delete/{id}")
    @PreAuthorize("@ss.hasPermi('project:info:remove')")
    @Operation(summary = "删除")
    public AjaxResult delete(@PathVariable Long id) {
        infoService.deleteInfo(id);
@@ -51,6 +56,7 @@
    }
    @PostMapping("/listPage")
    @PreAuthorize("@ss.hasPermi('project:info:list')")
    @Operation(summary = "分页列表")
    public AjaxResult listPage(@RequestBody @Valid SearchInfoVo vo) {
        return AjaxResult.success(infoService.searchListInfo(vo));
@@ -58,12 +64,14 @@
    @PostMapping("/{id}")
    @PreAuthorize("@ss.hasPermi('project:info:query')")
    @Operation(summary = "详情")
    public AjaxResult getInfoById(@PathVariable Long id) {
        return AjaxResult.success(infoService.getInfoById(id));
    }
    @PostMapping("/saveStage")
    @PreAuthorize("denyAll()")
    @Operation(summary = "保存阶段")
    public AjaxResult saveStage(@RequestBody @Valid SaveInfoStageVo dto) {
        infoStageHandleService.save(dto);
@@ -71,12 +79,14 @@
    }
    @PostMapping("/listStage/{id}")
    @PreAuthorize("denyAll()")
    @Operation(summary = "列表阶段")
    public AjaxResult listStage(@PathVariable Long id) {
        return AjaxResult.success(infoStageHandleService.getListVoByInfoId(id));
    }
    @PostMapping("/deleteStage/{id}")
    @PreAuthorize("denyAll()")
    @Operation(summary = "删除阶段")
    public AjaxResult deleteStage(@PathVariable Long id) {
        infoStageHandleService.deleteById(id);