Browse Source

fallback

dev
jianjun 3 years ago
parent
commit
b0a480d791
  1. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallBackFactory.java
  2. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallback.java
  3. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallBackFactory.java

@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
@Slf4j
@Component
public class CommonGovOrgFeignClientFallBackFactory implements FallbackFactory<CommonGovOrgFeignClient> {
private CommonOrgFeignClientFallback fallback = new CommonOrgFeignClientFallback();
private CommonGovOrgFeignClientFallback fallback = new CommonGovOrgFeignClientFallback();
@Override
public CommonGovOrgFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonOrgFeignClientFallback.java → epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallback.java

@ -15,7 +15,7 @@ import org.springframework.stereotype.Component;
* @Date 2020/4/24 11:17
**/
@Component
public class CommonOrgFeignClientFallback implements CommonGovOrgFeignClient {
public class CommonGovOrgFeignClientFallback implements CommonGovOrgFeignClient {
@Override
public Result<GridInfoCache> getGridInfo(CustomerGridFormDTO customerGridFormDTO) {

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java

@ -1047,7 +1047,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
//处理成功,隐藏网格
LambdaUpdateWrapper<CustomerGridEntity> updateGrid=new LambdaUpdateWrapper<>();
updateGrid.set(CustomerGridEntity::getAbandonFlag,NumConstant.ZERO);
updateGrid.set(CustomerGridEntity::getAbandonFlag,NumConstant.ONE);
updateGrid.eq(CustomerGridEntity::getId,gridId);
baseDao.update(null,updateGrid);
}

Loading…
Cancel
Save