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); } }