class ScriptsController {
    @Autowired
    private ScriptsService scriptsService;

    @WebAspect
    @Operation(summary = "查找脚本模板列表", description = "查找对应项目id的脚本列表")
    @Parameters(value = {
            @Parameter(name = "projectId", description = "项目id"),
            @Parameter(name = "name", description = "名称"),
            @Parameter(name = "page", description = "页码"),
            @Parameter(name = "pageSize", description = "页数据大小")
    })
    @GetMapping("/list")
    public RespModel<CommentPage<Scripts>> findAll(@RequestParam(name = "projectId", required = false) Integer projectId,
                                                   @RequestParam(name = "name", required = false) String name,
                                                   @RequestParam(name = "page") int page,
                                                   @RequestParam(name = "pageSize") int pageSize) {
        Page<Scripts> pageable = new Page<>(page, pageSize);
        return new RespModel<>(
                RespEnum.SEARCH_OK,
                CommentPage.convertFrom(scriptsService
                        .findByProjectId(projectId, name, pageable))
        );
    }

    @WebAspect
    @Operation(summary = "查找脚本详情", description = "查找对应id的对应脚本详细信息")
    @Parameter(name = "id", description = "id")
    @GetMapping
    public RespModel<Scripts> findById(@RequestParam(name = "id") int id) {<FILL_FUNCTION_BODY>}

    @WebAspect
    @Operation(summary = "删除脚本模板", description = "删除对应id")
    @Parameter(name = "id", description = "id")
    @DeleteMapping
    public RespModel<String> delete(@RequestParam(name = "id") int id) {
        if (scriptsService.delete(id)) {
            return new RespModel<>(RespEnum.DELETE_OK);
        } else {
            return new RespModel<>(RespEnum.DELETE_FAIL);
        }
    }

    @WebAspect
    @Operation(summary = "更新脚本信息", description = "新增或更新对应的脚本信息")
    @PutMapping
    public RespModel<String> save(@Validated @RequestBody ScriptsDTO scriptsDTO) {
        scriptsService.save(scriptsDTO.convertTo());
        return new RespModel<>(RespEnum.UPDATE_OK);
    }

}

        Scripts scripts = scriptsService.findById(id);
        if (scripts != null) {
            return new RespModel<>(RespEnum.SEARCH_OK, scripts);
        } else {
            return new RespModel<>(RespEnum.ID_NOT_FOUND);
        }
    
<no_super_class>