package com.sky.ioc.controller.security;

import com.sky.ioc.service.security.SecurityDeviceService;
import com.sky.ioc.tool.ReturnMsg;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "智慧安防--摄像头")
@Slf4j
@RequestMapping("/security_camera")
@RestController
public class CameraController {

    @Autowired
    private SecurityDeviceService securityDeviceService;

    @ApiOperation("海康平台--配置信息")
    @PostMapping("/apiInfo")
    public ReturnMsg getApiInfo() {
        return securityDeviceService.getCameraApiInfo();
    }

    @ApiOperation("海康平台--摄像头列表")
    @PostMapping("/getCameras")
    public ReturnMsg getCameras() {
        return securityDeviceService.getAllCameras();
    }

}
