diff --git a/bonus-base/src/main/resources/application.yml b/bonus-base/src/main/resources/application.yml index e6d5b88..6d7b04f 100644 --- a/bonus-base/src/main/resources/application.yml +++ b/bonus-base/src/main/resources/application.yml @@ -7,7 +7,7 @@ bonus: # 版权年份 copyrightYear: 2025 # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) - profile: D:/bonus/uploadPath + profile: /home/bonus/cloud/uploadPath # 获取ip地址开关 addressEnabled: false # 验证码类型 math 数字计算 char 字符验证 @@ -30,6 +30,8 @@ server: max: 800 # Tomcat启动初始化的线程数,默认值10 min-spare: 100 + connection-timeout: 6000000 + # max-http-form-post-size: -1 # 日志配置 logging: diff --git a/bonus-business/pom.xml b/bonus-business/pom.xml index 2118cf1..fe2060f 100644 --- a/bonus-business/pom.xml +++ b/bonus-business/pom.xml @@ -14,16 +14,16 @@ - - org.bytedeco - javacv - 1.5.10 - - - org.bytedeco - javacv-platform - 1.5.10 - + + + + + + + + + + com.bonus diff --git a/bonus-business/src/main/java/com/bonus/business/controller/VideoToMp4Converter.java b/bonus-business/src/main/java/com/bonus/business/controller/VideoToMp4Converter.java index 9aea8e4..9598eee 100644 --- a/bonus-business/src/main/java/com/bonus/business/controller/VideoToMp4Converter.java +++ b/bonus-business/src/main/java/com/bonus/business/controller/VideoToMp4Converter.java @@ -1,61 +1,61 @@ -package com.bonus.business.controller; - -import org.bytedeco.javacv.FFmpegFrameGrabber; -import org.bytedeco.javacv.FFmpegFrameRecorder; -import org.bytedeco.javacv.Frame; - -public class VideoToMp4Converter { - - /** - * 将视频文件转换为MP4格式 - * @param inputPath 输入视频文件路径 - * @param outputPath 输出MP4文件路径 - * @throws Exception 转换过程中的异常 - */ - public static void convertToMp4(String inputPath, String outputPath) throws Exception { - // 创建FFmpegFrameGrabber对象,读取输入视频 - FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(inputPath); - grabber.start(); - - // 创建FFmpegFrameRecorder对象,设置输出视频参数 - FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(outputPath, - grabber.getImageWidth(), - grabber.getImageHeight()); - - // 设置视频编码为H.264 - recorder.setVideoCodec(org.bytedeco.ffmpeg.global.avcodec.AV_CODEC_ID_H264); - // 设置输出格式为MP4 - recorder.setFormat("mp4"); - // 设置帧率与原视频保持一致 - recorder.setFrameRate(grabber.getFrameRate()); - // 设置音频通道数 - recorder.setAudioChannels(grabber.getAudioChannels()); - // 设置音频编码 - recorder.setAudioCodec(org.bytedeco.ffmpeg.global.avcodec.AV_CODEC_ID_AAC); - - recorder.start(); - - // 循环读取视频帧并进行录制 - Frame frame; - while ((frame = grabber.grabFrame()) != null) { - recorder.record(frame); - } - - // 关闭抓取器和录制器 - recorder.stop(); - grabber.stop(); - - System.out.println("视频转换完成!输出文件:" + outputPath); - } - - // 测试方法 - public static void main(String[] args) { - try { - String inputVideo = "input_video.flv"; // 输入视频文件,可以是任何格式 - String outputMp4 = "output_video.mp4"; // 输出MP4文件 - convertToMp4(inputVideo, outputMp4); - } catch (Exception e) { - e.printStackTrace(); - } - } -} \ No newline at end of file +//package com.bonus.business.controller; +// +//import org.bytedeco.javacv.FFmpegFrameGrabber; +//import org.bytedeco.javacv.FFmpegFrameRecorder; +//import org.bytedeco.javacv.Frame; +// +//public class VideoToMp4Converter { +// +// /** +// * 将视频文件转换为MP4格式 +// * @param inputPath 输入视频文件路径 +// * @param outputPath 输出MP4文件路径 +// * @throws Exception 转换过程中的异常 +// */ +// public static void convertToMp4(String inputPath, String outputPath) throws Exception { +// // 创建FFmpegFrameGrabber对象,读取输入视频 +// FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(inputPath); +// grabber.start(); +// +// // 创建FFmpegFrameRecorder对象,设置输出视频参数 +// FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(outputPath, +// grabber.getImageWidth(), +// grabber.getImageHeight()); +// +// // 设置视频编码为H.264 +// recorder.setVideoCodec(org.bytedeco.ffmpeg.global.avcodec.AV_CODEC_ID_H264); +// // 设置输出格式为MP4 +// recorder.setFormat("mp4"); +// // 设置帧率与原视频保持一致 +// recorder.setFrameRate(grabber.getFrameRate()); +// // 设置音频通道数 +// recorder.setAudioChannels(grabber.getAudioChannels()); +// // 设置音频编码 +// recorder.setAudioCodec(org.bytedeco.ffmpeg.global.avcodec.AV_CODEC_ID_AAC); +// +// recorder.start(); +// +// // 循环读取视频帧并进行录制 +// Frame frame; +// while ((frame = grabber.grabFrame()) != null) { +// recorder.record(frame); +// } +// +// // 关闭抓取器和录制器 +// recorder.stop(); +// grabber.stop(); +// +// System.out.println("视频转换完成!输出文件:" + outputPath); +// } +// +// // 测试方法 +// public static void main(String[] args) { +// try { +// String inputVideo = "input_video.flv"; // 输入视频文件,可以是任何格式 +// String outputMp4 = "output_video.mp4"; // 输出MP4文件 +// convertToMp4(inputVideo, outputMp4); +// } catch (Exception e) { +// e.printStackTrace(); +// } +// } +//} \ No newline at end of file diff --git a/bonus-business/src/main/resources/mapper/business/ProductScreenMapper.xml b/bonus-business/src/main/resources/mapper/business/ProductScreenMapper.xml index 31796e1..053c0a5 100644 --- a/bonus-business/src/main/resources/mapper/business/ProductScreenMapper.xml +++ b/bonus-business/src/main/resources/mapper/business/ProductScreenMapper.xml @@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" pmf.file_type fileType ,pmf.file_path filePath, pmf.bucket_name bucketName,pmf.original_name originalName from tb_promotion_material tpm left join sys_dict_data sdd on sdd.dict_value=tpm.type_id and sdd.dict_type='tb_product_type' - left join tb_promotion_material_files pmf on tpm.id=pmf.material_id and pmf.del_flag=0 and pmf.type_id=1 + left join tb_promotion_material_files pmf on tpm.id=pmf.material_id and pmf.del_flag=0 and pmf.type_id=2 where tpm.del_flag=0 and tpm.type_id=#{typeId} diff --git a/bonus-file/pom.xml b/bonus-file/pom.xml index 3817cad..824f21e 100644 --- a/bonus-file/pom.xml +++ b/bonus-file/pom.xml @@ -10,10 +10,6 @@ Archetype - bonus-file http://maven.apache.org - - - - com.bonus bonus-common diff --git a/pom.xml b/pom.xml index a377ba5..ddfb0bb 100644 --- a/pom.xml +++ b/pom.xml @@ -231,6 +231,7 @@ bonus-base bonus-framework bonus-generator + bonus-business bonus-system bonus-common bonus-file