class VersionsController {
    @Autowired
    private VersionsService versionsService;

    @WebAspect
    @Operation(summary = "更新版本迭代", description = "新增或更改版本迭代信息")
    @PutMapping
    public RespModel<String> save(@Validated @RequestBody VersionsDTO versionsDTO) {
        versionsService.save(versionsDTO.convertTo());
        return new RespModel<>(RespEnum.UPDATE_OK);
    }

    @WebAspect
    @Operation(summary = "查询版本迭代列表", description = "用于查询对应项目id下的版本迭代列表")
    @Parameter(name = "projectId", description = "项目id")
    @GetMapping("/list")
    public RespModel<List<Versions>> findByProjectId(@RequestParam(name = "projectId") int projectId) {
        return new RespModel<>(RespEnum.SEARCH_OK, versionsService.findByProjectId(projectId));
    }

    @WebAspect
    @Operation(summary = "删除版本迭代", description = "删除指定id的版本迭代")
    @Parameter(name = "id", description = "版本迭代id")
    @DeleteMapping
    public RespModel<String> delete(@RequestParam(name = "id") int id) {<FILL_FUNCTION_BODY>}

    @WebAspect
    @Operation(summary = "查询版本迭代信息", description = "查询指定id的版本迭代的详细信息")
    @Parameter(name = "id", description = "版本迭代id")
    @GetMapping
    public RespModel<Versions> findById(@RequestParam(name = "id") int id) {
        Versions versions = versionsService.findById(id);
        if (versions != null) {
            return new RespModel<>(RespEnum.SEARCH_OK, versions);
        } else {
            return new RespModel<>(RespEnum.ID_NOT_FOUND);
        }
    }
}

        if (versionsService.delete(id)) {
            return new RespModel<>(RespEnum.DELETE_OK);
        } else {
            return new RespModel<>(RespEnum.ID_NOT_FOUND);
        }
    
<no_super_class>