package com.sckw.fleet.api.feign;

import com.sckw.core.web.response.BaseResult;
import com.sckw.core.web.response.HttpResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * 车辆档案 Feign 服务。
 *
 * @author system
 * @date 2026-05-08
 */
@FeignClient(name = "sckw-ng-fleet", contextId = "fleetTruckFeignService")
public interface FleetTruckFeignService {

    /**
     * 根据车牌号查询车辆档案详情。
     *
     * @param truckNo 车牌号
     * @return 车辆档案详情
     */
    @GetMapping("/kwfTruck/findByTruckNo")
    HttpResult findByTruckNo(@RequestParam("truckNo") String truckNo);

    // sckw-modules-api/sckw-fleet-api/src/main/java/com/sckw/fleet/api/feign/FleetTruckFeignService.java

    @PostMapping("/kwfTruck/truckDetail")
    BaseResult<Map<String, Object>> truckDetail(@RequestBody Map<String, Object> param);

}
