All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.founder.api.RpcCommonGateway Maven / Gradle / Ivy

There is a newer version: 3.6.1.9
Show newest version
package com.founder.api;

import feign.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(name = "rpcCommonGateway", url = "${chis.fsi.fsi_baseurl}")
public interface RpcCommonGateway {

    /**
     * 医保网关调用 https://www.cnblogs.com/HMingR/p/13833936.html
     * @param path 公开路径
     * @param request 请求参数
     * @param paasid 请求头
     * @param signature 请求头
     * @param timestamp 请求头
     * @param nonce 请求头
     * @return consumes指的是发起请求时的「content-type=application/json」
     */
    @PostMapping(value = "{path}",consumes = MediaType.APPLICATION_JSON_VALUE,produces = MediaType.APPLICATION_JSON_VALUE)
    String call(@PathVariable("path") String path,
                @RequestBody String request,
                @RequestHeader("x-tif-paasid") String paasid,
                @RequestHeader("x-tif-signature") String signature,
                @RequestHeader("x-tif-timestamp") String timestamp,
                @RequestHeader("x-tif-nonce") String nonce);

    /**
     * 下载文件 https://www.jb51.net/article/171803.htm
     * @param path
     * @param request
     * @param paasid
     * @param signature
     * @param timestamp
     * @param nonce
     * @return
     */
    @PostMapping(value = "{path}",consumes = MediaType.APPLICATION_JSON_VALUE,produces = MediaType.APPLICATION_JSON_VALUE)
    Response down(@PathVariable("path") String path,
                  @RequestBody String request,
                  @RequestHeader("x-tif-paasid") String paasid,
                  @RequestHeader("x-tif-signature") String signature,
                  @RequestHeader("x-tif-timestamp") String timestamp,
                  @RequestHeader("x-tif-nonce") String nonce);

    /**
     * 上传文件
     * @param path
     * @param request
     * @param paasid
     * @param signature
     * @param timestamp
     * @param nonce
     * @return
     */
    @PostMapping(value = "{path}",consumes = MediaType.APPLICATION_JSON_VALUE,produces = MediaType.APPLICATION_JSON_VALUE)
    Response upload(@PathVariable("path") String path,
                    @RequestBody String request,
                    @RequestHeader("x-tif-paasid") String paasid,
                    @RequestHeader("x-tif-signature") String signature,
                    @RequestHeader("x-tif-timestamp") String timestamp,
                    @RequestHeader("x-tif-nonce") String nonce);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy