hsy
2026-08-28 a8e4132c3e2e9c3b3fcb0360901b35571b6464ea
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.ruoyi.projectManagement.controller;
 
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.projectManagement.pojo.ProjectConfig;
import com.ruoyi.projectManagement.service.ProjectConfigService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
 
@RestController
@RequestMapping("/projectManagement/config")
@Tag(name = "项目管理配置表")
@RequiredArgsConstructor
public class ProjectConfigController {
 
    private final ProjectConfigService projectConfigService;
 
    @GetMapping
    @Operation(summary = "获取全局配置")
    public AjaxResult getConfig() {
        return AjaxResult.success(projectConfigService.getGlobalConfig());
    }
 
    @PutMapping
    @Operation(summary = "修改全局配置")
    public AjaxResult updateConfig(@RequestBody ProjectConfig projectConfig) {
        projectConfigService.updateGlobalConfig(projectConfig);
        return AjaxResult.success();
    }
}