package com.sunda.spmscommon.feign;

import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(url = "${feign.client.url}", name = "commonurl")
public interface IFeignServiceCommon {

    /**
     * 实时远程向 SAP 请求交货单表头、供应商、交货单行项目、包装单号、箱码、箱码明细等信息
     * 通过 Http 协议来实现 RPC - 远程过程调用
     * feign.client.commonurl = http://192.168.106.25:9998/
     *
     * SAP生产环境;通过 Http 协议来实现 RPC - 远程过程调用
     * feign.client.url = http://192.168.106.42:9998/
     * @param json
     * @return
     */

    @RequestMapping(value = "/sunda_pos", method = RequestMethod.POST, consumes = "application/json")
    String sendRestToSapCommon(JSONObject json);

    @RequestMapping(value = "/common", method = RequestMethod.POST, consumes = "application/json")
    String sendCommonToSap(JSONObject json);

}
