UserFeignClient.java 1022 Bytes
package com.glsx.api.remote;

import com.glsx.api.pojo.request.UserRelationReq;
import com.glsx.api.pojo.response.UserRelationResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient(name = "${feign.server.name}",url = "${feign.server.url}")
public interface UserFeignClient {

    @ResponseBody
    @RequestMapping(value = "/user/getSingle", method = {RequestMethod.POST})
    UserRelationResp getSingle(@RequestBody UserRelationReq userRelation);

    @ResponseBody
    @RequestMapping(value = "/user/add", method = {RequestMethod.POST})
    Long add(@RequestBody UserRelationReq userRelation);

    @ResponseBody
    @RequestMapping(value = "/user/update", method = {RequestMethod.POST})
    Integer update(@RequestBody UserRelationReq userRelation);

}