liusuyi
2026-05-12 59b5859e049628aaeb1b971057a7a0427f92eb16
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
59
60
61
package com.ard.qs.controller;
 
import com.ard.common.core.web.controller.BaseController;
import com.ard.common.core.web.domain.AjaxResult;
import com.ard.qs.common.SystemAllInfo;
import com.ard.qs.domain.DeviceStats;
import com.ard.qs.service.IQsDeviceService;
import com.ard.qs.service.IRedisCatchStorageService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * 服务控制
 *
 * @FileName QsServerController
 * @Description
 * @Author fengcheng
 * @date 2026-04-15
 **/
@Tag(name = "服务控制")
@Slf4j
@RestController
@RequestMapping("/server")
public class QsServerController extends BaseController {
 
    @Autowired
    private IRedisCatchStorageService redisCatchStorageService;
 
    @Autowired
    private IQsDeviceService qsDeviceService;
 
    /**
     * 获取系统信息
     *
     * @return
     */
    @Operation(summary = "获取系统信息")
    @GetMapping(value = "/system/info")
    public AjaxResult getSystemInfo() {
        SystemAllInfo systemAllInfo = redisCatchStorageService.getSystemInfo();
        return success(systemAllInfo);
    }
 
    /**
     * 获取设备统计信息
     *
     * @return
     */
    @Operation(summary = "获取设备统计信息")
    @GetMapping(value = "/system/deviceStatist")
    public AjaxResult getDeviceStatistics() {
        DeviceStats deviceStats = qsDeviceService.getDeviceStatistics();
        return success(deviceStats);
    }
 
}