package com.usky.backend.controller.api;

import com.usky.backend.client.DeviceDataClient;
import com.usky.backend.domain.request.DataRealTimeRequestVO;
import com.usky.backend.domain.response.DataRealTimeResponseVO;
import com.usky.backend.service.DataRealTimeService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  数据统一存储 前端控制器
 * </p>
 *
 */
@RestController
@Api(tags = "数据统一存储RPC")
public class DeviceDataApi implements DeviceDataClient {

    @Autowired
    private DataRealTimeService dataRealTimeService;

    @Override
    public List<DataRealTimeResponseVO> data(String productCode, List<String> deviceIds){

        List<DataRealTimeResponseVO> list =  dataRealTimeService.data(productCode, deviceIds);
        return list;
    }

}
