package com.fastbee.data.controller.aaScreenAgricultural.deviceRealTimeData;

import com.fastbee.common.core.controller.BaseController;
import com.fastbee.common.core.domain.AjaxResult;
import com.fastbee.deviceData.api.yingshiyun.service.YingshiyunService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.query.Param;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 监控设备实时数据
 */
@RestController
@RequestMapping("/device/real/data")
public class DeviceMonitorController extends BaseController {
    @Autowired
    private YingshiyunService yingshiyunService;


    @GetMapping("/monitor")
    public AjaxResult getVideoUrl(@Param("deviceId") String deviceId){
        return success(yingshiyunService.getVideoPlayUrl(deviceId));
    }
}
