From 7862b29a1814c79c0c7939340c55de6a5296d683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E6=9C=A8c?= <857448963@qq.com> Date: Mon, 26 Feb 2024 20:40:38 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=B0=83=E6=95=B4pms=E5=9B=BD=E7=BD=91?= =?UTF-8?q?=E7=9B=91=E6=B5=8B=E7=82=B9=E5=8F=B0=E8=B4=A6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/njcn/device/biz/commApi/CommLedgerDeptClient.java | 3 +++ .../fallback/CommLedgerDeptClientFallbackFactory.java | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/pqs-device/common-device-biz/src/main/java/com/njcn/device/biz/commApi/CommLedgerDeptClient.java b/pqs-device/common-device-biz/src/main/java/com/njcn/device/biz/commApi/CommLedgerDeptClient.java index 00f230f24..fff0d444d 100644 --- a/pqs-device/common-device-biz/src/main/java/com/njcn/device/biz/commApi/CommLedgerDeptClient.java +++ b/pqs-device/common-device-biz/src/main/java/com/njcn/device/biz/commApi/CommLedgerDeptClient.java @@ -9,6 +9,7 @@ import com.njcn.device.biz.pojo.param.DeptGetLineParam; import com.njcn.user.pojo.po.Dept; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; @@ -37,6 +38,8 @@ public interface CommLedgerDeptClient { HttpResult update(@RequestBody Dept dept); + @GetMapping("/existMonitorDeptTree") + public HttpResult> existMonitorDeptTree(); } diff --git a/pqs-device/common-device-biz/src/main/java/com/njcn/device/biz/commApi/fallback/CommLedgerDeptClientFallbackFactory.java b/pqs-device/common-device-biz/src/main/java/com/njcn/device/biz/commApi/fallback/CommLedgerDeptClientFallbackFactory.java index 141ca1bbe..4d3fb429a 100644 --- a/pqs-device/common-device-biz/src/main/java/com/njcn/device/biz/commApi/fallback/CommLedgerDeptClientFallbackFactory.java +++ b/pqs-device/common-device-biz/src/main/java/com/njcn/device/biz/commApi/fallback/CommLedgerDeptClientFallbackFactory.java @@ -37,6 +37,12 @@ public class CommLedgerDeptClientFallbackFactory implements FallbackFactory> existMonitorDeptTree() { + log.error("{}异常,降级处理,异常为:{}", "获取存在投运监测点的部门id集合", throwable.toString()); + throw new BusinessException(finalExceptionEnum); + } + }; }