RemoteCustomerService.java
837 Bytes
package com.huaheng.config.api;
import com.huaheng.common.core.constant.ServiceNameConstants;
import com.huaheng.config.api.domain.Customer;
import com.huaheng.config.api.factory.RemoteCustomerFallFactory;
import com.huaheng.config.api.factory.RemoteLocationFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.function.Consumer;
@FeignClient(contextId = "remoteCustomerService", value = ServiceNameConstants.CONFIG_SERVICE, fallbackFactory = RemoteCustomerFallFactory.class)
public interface RemoteCustomerService {
@GetMapping("/customer/getCode")
Customer getCode(@RequestParam(value = "code")String code, @RequestParam(value = "companyCode")String companyCode);
}