package com.hdkj.lt.feign;

import com.hdkj.lt.base.constants.SystemGlobalConstant;
import com.hdkj.lt.feign.fallback.LineSvgFileApiClientFallBack;
import com.hdkj.lt.modle.dto.file.LineSvgFileBase;
import com.hdkj.lt.modle.dto.file.LineSvgFileGetDTO;
import com.hdkj.lt.modle.dto.svg.StationSvgGenerationDTO;
import com.hdkj.lt.modle.dto.svg.SvgGenerationDTO;
import com.hdkj.lt.modle.vo.svg.LineFileInfoVO;
import com.hdkj.lt.modle.vo.svg.StationFileInfoVO;
import com.hdkj.hussar.ApiResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @Description
 * @Author wcx
 * @Date 2025/6/3 10:12
 * @Version 1.0
 */
@FeignClient(value = SystemGlobalConstant.SERVICE_NAME_LOAD_TRANSFER_SI,contextId = "ILineSvgFileApiClient", fallbackFactory = LineSvgFileApiClientFallBack.class)
public interface ILineSvgFileApiClient {
    // 获取异动线路信息
    String API_MAPPING_SERVICE_LINE_GET = "feign/mapping/getLineByVersion";
    // 获取文件流信息
    String API_MAPPING_SERVICE_LINE_FILE_GET = "feign/mapping/getFileByLine";
    // 根据线路保存文件信息
    String API_MAPPING_SERVICE_LINE_FILE_SAVE = "feign/mapping/lineFileSave";
    // 根据变电站保存文件信息
    String API_MAPPING_SERVICE_STATION_FILE_SAVE = "feign/mapping/stationFileSave";

    @PostMapping(API_MAPPING_SERVICE_LINE_GET)
    ApiResponse<List<LineSvgFileGetDTO>> getLineByVersion(LineSvgFileBase lineSvgFile);

    @PostMapping(API_MAPPING_SERVICE_LINE_FILE_GET)
    ApiResponse<byte[]> getLineFileInfo(LineSvgFileGetDTO lineSvgFile);

    @PostMapping(API_MAPPING_SERVICE_LINE_FILE_SAVE)
    ApiResponse<List<LineFileInfoVO>> lineDynamicSvgSave(SvgGenerationDTO svgGeneration);

    @PostMapping(API_MAPPING_SERVICE_STATION_FILE_SAVE)
    ApiResponse<List<StationFileInfoVO>> stationDynamicSvgSave(StationSvgGenerationDTO stationSvgDTO);

}
