class GlobalParamsController {

    @Autowired
    private GlobalParamsService globalParamsService;

    @WebAspect
    @Operation(summary = "更新全局参数", description = "新增或更新对应的全局参数")
    @PutMapping
    public RespModel<String> save(@Validated @RequestBody GlobalParamsDTO globalParamsDTO) {
        globalParamsService.save(globalParamsDTO.convertTo());
        return new RespModel<>(RespEnum.UPDATE_OK);
    }

    @WebAspect
    @Operation(summary = "查找全局参数", description = "查找对应项目id的全局参数列表")
    @Parameter(name = "projectId", description = "项目id")
    @GetMapping("/list")
    public RespModel<List<GlobalParams>> findByProjectId(@RequestParam(name = "projectId") int projectId) {
        return new RespModel<>(RespEnum.SEARCH_OK, globalParamsService.findAll(projectId));
    }

    @WebAspect
    @Operation(summary = "删除全局参数", description = "删除对应id的全局参数")
    @Parameter(name = "id", description = "id")
    @DeleteMapping
    public RespModel<String> delete(@RequestParam(name = "id") int id) {
        if (globalParamsService.delete(id)) {
            return new RespModel<>(RespEnum.DELETE_OK);
        } else {
            return new RespModel<>(RespEnum.DELETE_FAIL);
        }
    }

    @WebAspect
    @Operation(summary = "查看全局参数信息", description = "查看对应id的全局参数")
    @Parameter(name = "id", description = "id")
    @GetMapping
    public RespModel<GlobalParams> findById(@RequestParam(name = "id") int id) {<FILL_FUNCTION_BODY>}
}

        GlobalParams globalParams = globalParamsService.findById(id);
        if (globalParams != null) {
            return new RespModel<>(RespEnum.SEARCH_OK, globalParams);
        } else {
            return new RespModel<>(RespEnum.ID_NOT_FOUND);
        }
    
<no_super_class>