xsl 2 mesiacov pred
rodič
commit
a86dbb155f

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>com.jkcredit.illegal.info</groupId>
     <artifactId>illegal-info</artifactId>
-    <version>2.0.1</version>
+    <version>2.0.3</version>
     <name>illegal-info</name>
     <description>Demo project for Spring Boot</description>
 

+ 6 - 0
src/main/java/com/jkcredit/illegal/info/service/impl/MonitorServiceImpl.java

@@ -31,13 +31,19 @@ public class MonitorServiceImpl implements MonitorService {
         LocalTime endTime = LocalTime.of(23, 0);
         boolean isWarnTime = !currentTime.isBefore(startTime) && !currentTime.isAfter(endTime);
         String serviceStatus = stringRedisTemplate.boundValueOps(CommonConstant.SERVICE_STATUS).get();
+        if (null == serviceStatus) {
+            stringRedisTemplate.boundValueOps(CommonConstant.SERVICE_STATUS).set(CommonConstant.SERVICE_AVAILABLE);
+            serviceStatus = CommonConstant.SERVICE_AVAILABLE;
+        }
 
         // 业务可用状态,并且时间在8-23点之间,做业务异常判断
         if (CommonConstant.SERVICE_AVAILABLE.equals(serviceStatus) && isWarnTime) {
+            log.info("业务当前状态为:可用");
             warn();
         }
         // 业务不可用状态,做业务恢复判断
         if (CommonConstant.SERVICE_UN_AVAILABLE.equals(serviceStatus)) {
+            log.info("业务当前状态为:不可用");
             recover();
         }
 

+ 1 - 1
src/main/resources/application.yml

@@ -16,7 +16,7 @@ illegalInfo:
   certificatePassword: client
   decodeKey: 374c72b109292ad4
 dingding:
-  url: https://oapi.dingtalk.com/robot/send?access_token=444ab311e2893855633d03998a616c2bf5541dbd4a2bda1bac501b4d87209172
+  url: https://oapi.dingtalk.com/robot/send?access_token=ec3366cb7e2e8a3b3e7ea0283667c071a7a8acf944004f5ec6bf9a346c80821f
 criminalInfo:
   url: http://36.133.192.19:9011/dsp/dataMark
   secretId: jiaoke