package com.hw.printer.api;

import com.hw.common.core.constant.SecurityConstants;
import com.hw.common.core.constant.ServiceNameConstants;
import com.hw.common.core.domain.R;
import com.hw.mes.api.domain.MesBaseBarcodeInfo;
import com.hw.printer.api.factory.RemotePrinterFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;


@FeignClient(contextId = "remotePrinterService", value = ServiceNameConstants.PRINTER_SERVICE, fallbackFactory = RemotePrinterFallbackFactory.class)
public interface RemotePrinterService {

    /**
     * 通过条码查询条码信息
     *
     * @param barcodeInfo 条码信息
     * @param source      请求来源
     * @return 结果
     */
    @PostMapping("/printService/printBarCode")
    public  MesBaseBarcodeInfo  printBarCode(@RequestBody MesBaseBarcodeInfo barcodeInfo, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);





}
