无关风月
2025-04-23 ccbfaf4700422eda488f5807ee9a0f3ce3a94b2c
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
52
53
54
55
56
57
58
package com.ruoyi.admin.large.controller;
 
 
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.admin.large.model.AnalysisServiceIndexChildData;
import com.ruoyi.admin.large.model.AnalysisServiceIndexData;
import com.ruoyi.admin.large.service.AnalysisServiceIndexChildDataService;
import com.ruoyi.admin.large.service.AnalysisServiceIndexDataService;
import com.ruoyi.admin.service.SysUserService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.security.service.TokenService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
import java.util.stream.Collectors;
 
/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xiaochen
 * @since 2025-04-21
 */
@Api(tags = "服务分析指标")
@RestController
@RequestMapping("/analysis-service-index-child-data")
public class AnalysisServiceIndexChildDataController {
    private final AnalysisServiceIndexChildDataService analysisServiceIndexChildDataService;
 
    @Autowired
    public AnalysisServiceIndexChildDataController(AnalysisServiceIndexChildDataService analysisServiceIndexChildDataService) {
        this.analysisServiceIndexChildDataService = analysisServiceIndexChildDataService;
    }
    /**
     * 修改服务指标分析渠道商
     */
    @ApiOperation( value = "修改服务指标分析渠道商")
    @PostMapping(value = "/update")
    public R<Boolean> update(@RequestBody List<AnalysisServiceIndexChildData> dto) {
        return R.ok(analysisServiceIndexChildDataService.updateBatchById(dto));
    }
 
    /**
     * 查询服务指标分析渠道商列表
     */
    @ApiOperation( value = "通过渠道商id查询指标-兼容大屏接口",notes = "兼容大屏接口")
    @GetMapping(value = "/getListByServiceId")
    public R<List<AnalysisServiceIndexChildData>> getListByServiceId(@RequestParam("serviceIndexId") Integer serviceIndexId) {
        List<AnalysisServiceIndexChildData> list = analysisServiceIndexChildDataService.list(Wrappers.lambdaQuery(AnalysisServiceIndexChildData.class)
                .eq(AnalysisServiceIndexChildData::getServiceIndexId, serviceIndexId));
        return R.ok(list);
    }
 
}