7 changed files with 32 additions and 76 deletions
@ -1,18 +0,0 @@ |
|||
package com.epmet.feign.fallback; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.ModuleUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.CustomerGridDTO; |
|||
import com.epmet.feign.GovOrgFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
|
|||
@Component |
|||
public class GovOrgFeignClientFallBack implements GovOrgFeignClient { |
|||
|
|||
@Override |
|||
public Result<CustomerGridDTO> get(String id) { |
|||
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "get", id); |
|||
} |
|||
} |
@ -1,10 +1,10 @@ |
|||
package com.epmet.feign; |
|||
package com.epmet.modules.feign; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.CustomerDepartmentDTO; |
|||
import com.epmet.dto.CustomerGridDTO; |
|||
import com.epmet.feign.fallback.GovOrgFeignClientFallBack; |
|||
import com.epmet.modules.feign.fallback.GovOrgFeignClientFallBack; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
|
@ -0,0 +1,24 @@ |
|||
package com.epmet.modules.feign.fallback; |
|||
|
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.CustomerDepartmentDTO; |
|||
import com.epmet.dto.CustomerGridDTO; |
|||
import com.epmet.modules.feign.GovOrgFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
|
|||
@Component |
|||
public class GovOrgFeignClientFallBack implements GovOrgFeignClient { |
|||
|
|||
|
|||
@Override |
|||
public Result<CustomerGridDTO> getGrid(String id) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public Result<CustomerDepartmentDTO> getDept(String id) { |
|||
return null; |
|||
} |
|||
} |
Loading…
Reference in new issue