xuhy
2025-04-26 349b323a358ba85443ac25f52aa0fc11221c8437
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package com.ruoyi.admin.controller.large;
 
 
import com.ruoyi.admin.large.model.AnalysisSetData;
import com.ruoyi.admin.large.service.AnalysisSetDataService;
import com.ruoyi.common.core.domain.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xiaochen
 * @since 2025-04-22
 */
@Api(tags = {"大屏-统计数据设置"})
@RestController
@RequestMapping("/analysis-set-data")
public class AnalysisSetDataController {
 
    private final AnalysisSetDataService analysisSetDataService;
 
    @Autowired
    public AnalysisSetDataController(AnalysisSetDataService analysisSetDataService) {
        this.analysisSetDataService = analysisSetDataService;
    }
 
    /**
     * 查询统计数据设置
     */
    @ApiOperation( value = "查询统计数据设置-兼容大屏接口")
    @GetMapping(value = "/getById")
    public R<AnalysisSetData> getById() {
        AnalysisSetData analysisSetData = analysisSetDataService.getById(1);
        return R.ok(analysisSetData);
    }
 
    /**
     * 修改统计数据设置
     */
    @ApiOperation( value = "修改统计数据设置")
    @PostMapping(value = "/update")
    public R<Boolean> update(@RequestBody AnalysisSetData dto) {
        return R.ok(analysisSetDataService.updateById(dto));
    }
 
}