package com.cmvr.web.controller.api;

import com.cmvr.common.core.controller.BaseController;
import com.cmvr.common.core.domain.AjaxResult;
import com.cmvr.edge.client.service.EdgeSystemService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "边缘--系统功能")
@RestController
@RequestMapping("/api/system")
@RequiredArgsConstructor
public class EdgeSystemController extends BaseController {

    private final EdgeSystemService edgeSystemService;

    @ApiOperation("停止所有设备")
    @GetMapping("/stopAll")
    public AjaxResult stopAll(String terminalId) {
        return AjaxResult.ok(edgeSystemService.stopAll(terminalId));
    }
}
