海南初始版本提交

This commit is contained in:
hzj
2024-03-06 17:04:08 +08:00
parent 34b76fe7ff
commit 4ed75512fb
66 changed files with 7663 additions and 33 deletions

View File

@@ -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();
}

View File

@@ -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);
}
};
}