package com.xisc.pm.infra.feign;

import com.xisc.pm.api.dto.InterfaceReceiveDTO;
import com.xisc.pm.infra.feign.fallback.LgApiFeignFallbackFactory;
import io.choerodon.swagger.annotation.Permission;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author 纪文桃 wentao.ji01@hand-china.com
 * @date 2025/1/3 15:00
 * @description
 */
@FeignClient(value = "${xisc.service.lg.name:xisc-lg-client}", fallbackFactory = LgApiFeignFallbackFactory.class)
public interface LgApiFeign {

    @ApiOperation(value = "线板材MES接口")
    @Permission(permissionLogin = true)
    @PostMapping("/v1/{organizationId}/di-socket-client-data-sends/secondLevel")
    ResponseEntity<String> secondPlanAssign(@PathVariable Long organizationId, @RequestBody InterfaceReceiveDTO dto);
}
