瀏覽代碼

新增报警模块

shilin 3 年之前
父節點
當前提交
07b76a4389

+ 5 - 0
web/consumer-hb/src/main/java/com/gyee/consumer/config/FeignConfiguration.java

@@ -1,6 +1,7 @@
 package com.gyee.consumer.config;
 
 
+import com.gyee.consumer.fallback.alarm.AlarmServiceFallbackFactory;
 import com.gyee.consumer.fallback.compare.CompareServiceFallbackFactory;
 import com.gyee.consumer.fallback.goodness.WindturbineGoodnessServiceFallbackFactory;
 import com.gyee.consumer.fallback.leaderboard.LeaderboardServiceFallbackFactory;
@@ -117,6 +118,10 @@ public class FeignConfiguration {
         return new YawServiceFallbackFactory();
     }
 
+    @Bean
+    public AlarmServiceFallbackFactory alarmServiceFallbackFactory() {
+        return new AlarmServiceFallbackFactory();
+    }
 
 
 }

+ 5 - 6
web/consumer-hb/src/main/java/com/gyee/consumer/fallback/health/HealthServiceFallbackFactory.java

@@ -4,7 +4,6 @@ import com.gyee.common.domain.AjaxResult;
 import com.gyee.consumer.model.Tablepar;
 import com.gyee.consumer.service.health.HealthService;
 import feign.hystrix.FallbackFactory;
-import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
 
 public class HealthServiceFallbackFactory implements FallbackFactory<HealthService> {
@@ -183,11 +182,11 @@ public class HealthServiceFallbackFactory implements FallbackFactory<HealthServi
     }
 
     /***********************************************************************************************************************/
-            /**风机健康列表**/
-            @Override
-            public AjaxResult windTurbineHealthList(@RequestParam("wpId") String wpId) throws Exception  {
-                return  AjaxResult.error(throwable.getMessage());
-            }
+    /**风机健康列表**/
+    @Override
+    public AjaxResult windTurbineHealthList(@RequestParam("wpId") String wpId) throws Exception  {
+        return  AjaxResult.error(throwable.getMessage());
+    }
 
       /***********************************************************************************************************************/
 

+ 26 - 18
web/consumer-hb/src/main/resources/application.yml

@@ -2,8 +2,8 @@
 gyee:
   #API访问ip
   #swaggerip: 10.83.68.97:8170
-  swaggerip: 192.168.56.1:8170
-  #swaggerip: 192.168.2.216:8170
+  #swaggerip: 192.168.56.1:8170
+  swaggerip: 192.168.2.216:8170
 server:
   port: 8170
 
@@ -13,12 +13,12 @@ spring:
   cloud:
     sentinel:
       transport:
-        dashboard: 192.168.56.1:8080
-        port: 8719
+        dashboard: 192.168.2.216:8849
+        port: 8169
       datasource:
         ds1:
           nacos:
-            server-addr: 192.168.56.1:8848
+            server-addr: 192.168.2.216:8848
             data-id: ${spring.application.name}.json
             group-id: DEFAULT_GROUP
             data-type: json
@@ -28,9 +28,9 @@ spring:
       eager: true
     nacos:
       discovery:
-        server-addr: 192.168.56.1:8848
+        #server-addr: 192.168.56.1:8848
         #server-addr: 10.83.68.97:8848
-        #server-addr: 192.168.2.216:8848
+        server-addr: 192.168.2.216:8848
         #指定yaml格式的配置
         file-extension: yaml
         cluster-name: master
@@ -38,8 +38,9 @@ spring:
       password: nacos
   #redis集群
   redis:
-    host: 10.0.118.73
-    #host: 192.168.2.202
+    #host: 10.0.118.73
+    #host: 123.60.213.70
+    host: 192.168.2.202
     #host: 10.83.68.94
     password:
     port: 6379
@@ -58,18 +59,21 @@ spring:
         min-idle: 0
         max-idle: 8
         max-wait: -1
-    database: 1
+    database: 19
   autoconfigure:
     exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
     driver-class-name: oracle.jdbc.OracleDriver
     #外网
-    url: jdbc:oracle:thin:@10.0.118.71:1521:gdsj
+    #url: jdbc:oracle:thin:@10.0.118.71:1521:gdsj
+    #url: jdbc:oracle:thin:@123.60.213.70:1521:gdnxfd
     #url: jdbc:oracle:thin:@10.83.68.165:1521:gdsj
-    #url: jdbc:oracle:thin:@192.168.2.215:1521:gdsj
+    url: jdbc:oracle:thin:@192.168.2.215:1521:gdsj
     username: gdprod
     password: gd123
+    #username: nxfdprod
+    #password: gdnxfd123
     oracle-schema=:
     druid:
       max-active: 20
@@ -126,12 +130,16 @@ feign:
         read-timeout: 60000
         connect-timeout: 60000
 provider:
-  monitorurl: http://192.168.56.1:8171/
-  healthurl: http://192.168.56.1:8172/
-  analysisurl: http://192.168.56.1:8173/
-  adminurl: http://192.168.56.1:8174/
-  #url: http://10.83.68.97:8171/
-  #url: http://192.168.2.216:8171/
+#  monitorurl: http://192.168.56.1:8171/
+#  healthurl: http://192.168.56.1:8172/
+#  analysisurl: http://192.168.56.1:8173/
+#  adminurl: http://192.168.56.1:8174/
+#  alarmurl: http://192.168.56.1:8176/
+  monitorurl: http://192.168.2.216:8171/
+  healthurl: http://192.168.2.216:8172/
+  analysisurl: http://192.168.2.216:8173/
+  adminurl: http://192.168.2.216:8174/
+  alarmurl: http://192.168.2.216:8176/
 management:
   endpoints:
     jmx: