package com.muyu.analysis.parsing.remote;

import com.muyu.analysis.parsing.remote.factory.RemoteClientServiceFactory;
import com.muyu.common.core.constant.ServiceNameConstants;
import com.muyu.common.core.domain.Result;
import com.muyu.enterprise.domain.resp.car.MessageValueListResp;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * 报文模版远程调用接口
 * @Author：李庆帅
 * @Package：com.muyu.analysis.parsing.feign
 * @Project：cloud-server
 * @name：RemoteServiceClient
 * @Date：2024/9/28 20:38
 * ,,value = ServiceNameConstants.ENTERPRISE_SERVICE
 *         ,fallbackFactory= RemoteClientServiceFactory.class
 */
@FeignClient(name = "cloud-enterprise",value = ServiceNameConstants.ENTERPRISE_SERVICE
                 ,fallbackFactory= RemoteClientServiceFactory.class
)
public interface RemoteClientService {
    /**
     * 根据报文模版id查询报文数据
     * @param vehicleVin 请求对象
     * @return 返回结果
     */
    @GetMapping("/vehicleManage/findByVehicleVin/{vehicleVin}")
//    @Operation(description = "通过车辆vin码查询模板id")
    public Result<Long> findByVehicleVin(@PathVariable("vehicleVin") String vehicleVin);

    /**
     * 根据报文模版id查询报文数据
     * @param templateId 请求对象
     * @return 返回结果
     */
    @GetMapping("/messageValue/findByTemplateId/{templateId}")
//    @Operation(summary = "根据报文模版id查询报文数据", description = "根据报文模版id查询报文数据")
    public Result<List<MessageValueListResp>> findByTemplateId(@PathVariable("templateId") Long templateId);

}
