海南初始版本提交
This commit is contained in:
@@ -7,6 +7,8 @@ import com.njcn.device.pq.pojo.vo.TerminalTree;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
*
|
||||
@@ -21,4 +23,8 @@ public interface DeviceTreeClient {
|
||||
*/
|
||||
@GetMapping("/getTerminalTreeForFive")
|
||||
HttpResult<TerminalTree> getTerminalTreeForFive();
|
||||
|
||||
|
||||
@GetMapping("getTerminalTree")
|
||||
HttpResult<List<TerminalTree>> getTerminalTree();
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@ import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
*
|
||||
@@ -36,6 +38,12 @@ public class DeviceTreeClientFallbackFactory implements FallbackFactory<DeviceTr
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<TerminalTree>> getTerminalTree() {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取终端树",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user