648540858
2024-01-22 97a87542a63382d2ee129803e69e5751a3d6272c
Merge branch '2.6.9' into wvp-28181-2.0

# Conflicts:
# pom.xml
7个文件已修改
1个文件已删除
15599 ■■■■■ 已修改文件
pom.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/genersoft/iot/vmp/service/ICloudRecordService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/genersoft/iot/vmp/service/impl/CloudRecordServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/genersoft/iot/vmp/vmanager/cloudRecord/CloudRecordController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/all-application.yml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-dev.yml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-docker.yml 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web_src/package-lock.json 15526 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml
@@ -181,6 +181,20 @@
            <artifactId>springdoc-openapi-security</artifactId>
            <version>1.6.10</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.baomidou/dynamic-datasource-spring-boot-starter -->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
            <version>3.6.1</version>
        </dependency>
        <!--在线文档 -->
        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-ui</artifactId>
            <version>1.6.10</version>
        </dependency>
        <dependency>
            <groupId>com.github.xiaoymin</groupId>
src/main/java/com/genersoft/iot/vmp/service/ICloudRecordService.java
@@ -33,7 +33,8 @@
    /**
     * 添加合并任务
     */
    String addTask(String app, String stream, MediaServerItem mediaServerItem, String startTime, String endTime, String callId, String remoteHost);
    String addTask(String app, String stream, MediaServerItem mediaServerItem, String startTime,
                   String endTime, String callId, String remoteHost, boolean filterMediaServer);
    /**
src/main/java/com/genersoft/iot/vmp/service/impl/CloudRecordServiceImpl.java
@@ -2,6 +2,7 @@
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.gb28181.session.VideoStreamSessionManager;
import com.genersoft.iot.vmp.media.zlm.AssistRESTfulUtils;
@@ -29,6 +30,7 @@
import java.util.*;
@Service
@DS("share")
public class CloudRecordServiceImpl implements ICloudRecordService {
    private final static Logger logger = LoggerFactory.getLogger(CloudRecordServiceImpl.class);
@@ -109,7 +111,8 @@
    }
    @Override
    public String addTask(String app, String stream, MediaServerItem mediaServerItem, String startTime, String endTime, String callId, String remoteHost) {
    public String addTask(String app, String stream, MediaServerItem mediaServerItem, String startTime, String endTime,
                          String callId, String remoteHost, boolean filterMediaServer) {
        // 参数校验
        assert app != null;
        assert stream != null;
@@ -128,7 +131,8 @@
        List<MediaServerItem> mediaServers = new ArrayList<>();
        mediaServers.add(mediaServerItem);
        // 检索相关的录像文件
        List<String> filePathList = cloudRecordServiceMapper.queryRecordFilePathList(app, stream, startTimeStamp, endTimeStamp, callId, mediaServers);
        List<String> filePathList = cloudRecordServiceMapper.queryRecordFilePathList(app, stream, startTimeStamp,
                endTimeStamp, callId, filterMediaServer ? mediaServers : null);
        if (filePathList == null || filePathList.isEmpty()) {
            throw new ControllerException(ErrorCode.ERROR100.getCode(), "未检索到视频文件");
        }
src/main/java/com/genersoft/iot/vmp/vmanager/cloudRecord/CloudRecordController.java
@@ -167,10 +167,6 @@
            @RequestParam(required = false) String callId,
            @RequestParam(required = false) String remoteHost
    ){
        System.out.println(request.getScheme());
        System.out.println(request.getLocalAddr());
        System.out.println(request.getRemoteAddr());
        System.out.println(request.getRequestURI());
        MediaServerItem mediaServerItem;
        if (mediaServerId == null) {
            mediaServerItem = mediaServerService.getDefaultMediaServer();
@@ -184,7 +180,7 @@
                remoteHost = request.getScheme() + "://" + request.getLocalAddr() + ":" + mediaServerItem.getRecordAssistPort();
            }
        }
        return cloudRecordService.addTask(app, stream, mediaServerItem, startTime, endTime, callId, remoteHost);
        return cloudRecordService.addTask(app, stream, mediaServerItem, startTime, endTime, callId, remoteHost, mediaServerId != null);
    }
    @ResponseBody
src/main/resources/all-application.yml
@@ -47,6 +47,10 @@
        #    username: root
        #    password: SYceshizu1234
        # mysql配置
        dynamic:
            primary: master
            datasource:
                master:
        type: com.zaxxer.hikari.HikariDataSource
        driver-class-name: com.mysql.cj.jdbc.Driver
        url: jdbc:mysql://127.0.0.1:3306/wvp2?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false&allowMultiQueries=true
@@ -59,6 +63,13 @@
            minimum-idle: 10                       # 连接池最小空闲连接数
            idle-timeout: 300000                  # 允许连接在连接池中空闲的最长时间(以毫秒为单位)
            max-lifetime: 1200000                 # 是池中连接关闭后的最长生命周期(以毫秒为单位)
                share:
                    type: com.zaxxer.hikari.HikariDataSource
                    driver-class-name: com.mysql.cj.jdbc.Driver
                    url: jdbc:mysql://127.0.0.1:3306/wvp269_1?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
                    username: root
                    password: 12345678
# 修改分页插件为 postgresql, 数据库类型为mysql不需要
src/main/resources/application-dev.yml
@@ -24,16 +24,20 @@
    timeout: 10000
    # mysql数据源
  datasource:
    dynamic:
      primary: master
      datasource:
        master:
    type: com.zaxxer.hikari.HikariDataSource
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false&allowMultiQueries=true
          url: jdbc:mysql://127.0.0.1:3306/wvp2?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false&allowMultiQueries=true
    username: root
    password: root
          password: root123
    hikari:
      connection-timeout: 20000             # 是客户端等待连接池连接的最大毫秒数
      initialSize: 10                       # 连接池初始化连接数
            initialSize: 50                       # 连接池初始化连接数
      maximum-pool-size: 200                # 连接池最大连接数
      minimum-idle: 5                       # 连接池最小空闲连接数
            minimum-idle: 10                       # 连接池最小空闲连接数
      idle-timeout: 300000                  # 允许连接在连接池中空闲的最长时间(以毫秒为单位)
      max-lifetime: 1200000                 # 是池中连接关闭后的最长生命周期(以毫秒为单位)
#[可选] WVP监听的HTTP端口, 网页和接口调用都是这个端口
src/main/resources/application-docker.yml
@@ -18,13 +18,22 @@
        timeout: 10000
    # [必选] jdbc数据库配置
    datasource:
        # 使用mysql 打开23-28行注释, 删除29-36行
         name: wvp
         url: jdbc:mysql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&allowMultiQueries=true&useSSL=false&allowMultiQueries=true
         username: root
         password: root
        dynamic:
            primary: master
            datasource:
                master:
         type: com.zaxxer.hikari.HikariDataSource
         driver-class-name: com.mysql.cj.jdbc.Driver
                    url: jdbc:mysql://127.0.0.1:3306/wvp2?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false&allowMultiQueries=true
                    username: root
                    password: root123
                    hikari:
                        connection-timeout: 20000             # 是客户端等待连接池连接的最大毫秒数
                        initialSize: 50                       # 连接池初始化连接数
                        maximum-pool-size: 200                # 连接池最大连接数
                        minimum-idle: 10                       # 连接池最小空闲连接数
                        idle-timeout: 300000                  # 允许连接在连接池中空闲的最长时间(以毫秒为单位)
                        max-lifetime: 1200000                 # 是池中连接关闭后的最长生命周期(以毫秒为单位)
# [可选] WVP监听的HTTP端口, 网页和接口调用都是这个端口
server:
web_src/package-lock.json
File was deleted