shikeying
2022-10-11 71d355f4db31807a13d78e6e257e9d26c4702c23
修复写入问题,要更新包jdbc
4个文件已修改
18 ■■■■ 已修改文件
deploy-jar-template/src/main/resources/application-dev.yml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
recommend-video/src/main/java/com/iplatform/recvideo/scheduler/VideoSearchScheduler.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
recommend-video/src/main/java/com/iplatform/recvideo/service/VideoLoaderServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
recommend-video/src/main/java/com/iplatform/recvideo/support/DefaultVideoLoader.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
deploy-jar-template/src/main/resources/application-dev.yml
@@ -92,13 +92,14 @@
#    data-folder: /opt/ai/video/
    # 视频相似度AI服务URL
    ai-service: http://121.36.40.27:12345
#    ai-service: http://121.36.40.27:12345
    ai-service: http://127.0.0.1:8801
    # 推荐相似视频(算法)前多少个
    top-n: 40
    # 测试模式,如果是则仅生成固定测试数据,正式部署需要改为 false
    test-mode: true
    test-mode: false
    #业务视频所在数据库信息
    business-datasource-url: 124.70.39.177
recommend-video/src/main/java/com/iplatform/recvideo/scheduler/VideoSearchScheduler.java
@@ -48,9 +48,14 @@
                return null;
            }
            logger.debug("开始启动批次查询:" + this.currentVideoSearchMeta.getBatchId());
        } else {
            // 如果 this.videoSearchTask 已经初始化,但 currentVideoSearchMeta == null,则需要查询数据库状态
            Object[] params = new Object[]{this.videoSearchTask.getSql(), new Object[]{}};
            this.currentVideoSearchMeta = (VideoSearchMeta)this.videoSearchTask.run(null, null, null, params);
        }
        if(this.currentVideoSearchMeta == null){
            // 说明上次已经创建 videoSearchTask 任务,但没有返回有效任务记录
            logger.debug(".........没有查询到要采集的记录:currentVideoSearchMeta");
            return null;
        }
recommend-video/src/main/java/com/iplatform/recvideo/service/VideoLoaderServiceImpl.java
@@ -38,7 +38,11 @@
     * @date 2022-09-26
     */
    public int execSaveBatchAndStatus(List<Rc_video_batch> videoBatchList, Rc_task_status status){
        // 注意:如果要插入数据,不要设置设置主键(save),
        // 如果要设置自己主键,请使用方法: insert();
        // 2022-10-11
        this.save(videoBatchList);
        // 已经在外部保存了,这里就不需要了。
//        this.save(status);
        return videoBatchList.size();
    }
recommend-video/src/main/java/com/iplatform/recvideo/support/DefaultVideoLoader.java
@@ -18,6 +18,7 @@
import com.walker.infrastructure.utils.CollectionUtils;
import com.walker.infrastructure.utils.DateUtils;
import com.walker.infrastructure.utils.NumberGenerator;
import com.walker.infrastructure.utils.StringUtils;
import java.io.File;
import java.util.*;
@@ -60,7 +61,8 @@
        VideoSimilarProperties videoSimilarProperties = BeanContextAware.getBeanByType(VideoSimilarProperties.class);
        String dataFolder = videoSimilarProperties.getDataFolder();
        String pathSeparator = File.separator;
//        String pathSeparator = File.separator;
        String pathSeparator = StringUtils.FOLDER_SEPARATOR;
        for (Map<String, Object> srcVideoMap : srcVideoList) {
            //  videoSrcPath ==》[{"name": "/opt/home/train/tmp/2020/10/28/video/489c9fd871a04537bd20ebfc47457368.mp4", "path": "/train/2020/10/28/100cecfe4d4b4e70a2eb2733d78ec12e.mp4"}]