package net.northking.cctp.executePlan.feign;

import io.swagger.annotations.ApiOperation;
import net.northking.cctp.common.feign.FeignCctpConfig;
import net.northking.cctp.executePlan.dto.planSceneCase.CdEngineInfoDetailDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>Title: DeviceFeignClient</p>
 * <p>Description: </p>
 *
 * @Author chenjianfeng
 * @Version V1.0
 * @Date 2022/12/27
 * <p>Copyright (c) 京北方信息技术股份有限公司 Corporation 2022 . All rights reserved.</p>
 */
@FeignClient(name = "cctp-device-mgr", path = "/cctp-device-mgr", configuration = {FeignCctpConfig.class})
public interface DeviceFeignClient {

    /**
     * 根据设备ID获取设备信息
     * @param deviceIdList 设备ID集合
     * @return 设备信息
     */
    @ApiOperation(value = "根据设备ID获取设备信息")
    @PostMapping(value = "/v1/query/deviceInfo")
    List<Map<String, Object>> queryDeviceInfo(@RequestBody Set<String> deviceIdList);

    @ApiOperation(value = "直播申请设备的token")
    @GetMapping(value = "/v1/query/device/token/{deviceId}")
    public String queryDeviceToken(@PathVariable("deviceId") String deviceId);

    @ApiOperation(value = "根据引擎id获取引擎信息")
    @GetMapping(value = "/v1/query/engineInfo/{uuid}")
    CdEngineInfoDetailDto queryEngineInfo(@PathVariable("uuid") String uuid);
}
