package com.muyu.remote;

import com.muyu.common.core.constant.ServiceNameConstants;
import com.muyu.common.core.domain.Result;
import com.muyu.domain.req.MessageValueReq;
import com.muyu.domain.resp.MessageValueListResp;
import com.muyu.remote.factory.RemoteMessageValueFallbackFactory;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * vin查询报文模版类型
 * @version 1.0
 * @Author xie ya ru
 * @Date 2024/9/28 21:00
 */
@FeignClient(contextId = "remoteMessageValueService", value = ServiceNameConstants.ENTERPRISE_SERVICE, fallbackFactory = RemoteMessageValueFallbackFactory.class,path = "messageValue")
public interface RemoteMessageValueService {

    @PostMapping("/findByTemplateId/{stringVin}")
    @Operation(summary = "根据车辆类型查询报文模版ID",description = "根据车辆类型查询报文模版ID")
     Result<Long> findByTemplateId(@PathVariable("stringVin") String stringVin);

    @RequestMapping(value = "/list", method = RequestMethod.POST)
     Result<List<MessageValueListResp>> findAll(@RequestBody MessageValueReq messageValueReq);

}
