From 8730171a006fc7117229269677a96c4f367b29c8 Mon Sep 17 00:00:00 2001
From: 55007 <55007@maojian>
Date: Tue, 7 Jan 2025 18:13:55 +0800
Subject: [PATCH] =?UTF-8?q?mimax=E5=A4=A7=E6=A8=A1=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.classpath | 40 +
.gitignore | 2 +
.project | 23 +
.settings/org.eclipse.core.resources.prefs | 5 +
.settings/org.eclipse.jdt.core.prefs | 9 +
.settings/org.eclipse.m2e.core.prefs | 4 +
README.md | 1 +
pom.xml | 286 ++++++
src/main/java/com/bfd/qanda/Application.java | 24 +
src/main/java/com/bfd/qanda/cache/ConfigCache.java | 37 +
src/main/java/com/bfd/qanda/cache/LocalCache.java | 65 ++
.../com/bfd/qanda/controller/QandaController.java | 47 +
src/main/java/com/bfd/qanda/entity/Constants.java | 168 +++
.../java/com/bfd/qanda/handler/MainHandler.java | 140 +++
.../com/bfd/qanda/process/PullVideoProcess.java | 174 ++++
.../java/com/bfd/qanda/process/QandaPorcess.java | 213 ++++
.../bfd/qanda/process/VideoGenerationProcess.java | 90 ++
.../java/com/bfd/qanda/service/QandaService.java | 24 +
.../bfd/qanda/service/impl/QandaServiceImpl.java | 87 ++
src/main/java/com/bfd/qanda/utils/DataUtil.java | 48 +
src/main/java/com/bfd/qanda/utils/DateUtil.java | 177 ++++
.../java/com/bfd/qanda/utils/DownLoadUtil.java | 1070 ++++++++++++++++++++
.../java/com/bfd/qanda/utils/EncryptionUtil.java | 27 +
src/main/java/com/bfd/qanda/utils/FileUtil.java | 36 +
.../com/bfd/qanda/utils/GPTResultParseUtil.java | 53 +
src/main/java/com/bfd/qanda/utils/JsonUtil.java | 32 +
src/main/java/com/bfd/qanda/utils/OtherUtils.java | 33 +
src/main/java/com/bfd/qanda/utils/PauseTool.java | 92 ++
src/main/java/com/bfd/qanda/utils/QueueUtil.java | 18 +
.../java/com/bfd/qanda/utils/SpringBootKafka.java | 46 +
.../java/com/bfd/qanda/utils/ThrowMessageUtil.java | 23 +
src/main/resources/application.yml | 102 ++
src/main/resources/logback-spring.xml | 36 +
src/test/java/com/bfd/AppTest.java | 20 +
34 files changed, 3252 insertions(+)
create mode 100644 .classpath
create mode 100644 .gitignore
create mode 100644 .project
create mode 100644 .settings/org.eclipse.core.resources.prefs
create mode 100644 .settings/org.eclipse.jdt.core.prefs
create mode 100644 .settings/org.eclipse.m2e.core.prefs
create mode 100644 README.md
create mode 100644 pom.xml
create mode 100644 src/main/java/com/bfd/qanda/Application.java
create mode 100644 src/main/java/com/bfd/qanda/cache/ConfigCache.java
create mode 100644 src/main/java/com/bfd/qanda/cache/LocalCache.java
create mode 100644 src/main/java/com/bfd/qanda/controller/QandaController.java
create mode 100644 src/main/java/com/bfd/qanda/entity/Constants.java
create mode 100644 src/main/java/com/bfd/qanda/handler/MainHandler.java
create mode 100644 src/main/java/com/bfd/qanda/process/PullVideoProcess.java
create mode 100644 src/main/java/com/bfd/qanda/process/QandaPorcess.java
create mode 100644 src/main/java/com/bfd/qanda/process/VideoGenerationProcess.java
create mode 100644 src/main/java/com/bfd/qanda/service/QandaService.java
create mode 100644 src/main/java/com/bfd/qanda/service/impl/QandaServiceImpl.java
create mode 100644 src/main/java/com/bfd/qanda/utils/DataUtil.java
create mode 100644 src/main/java/com/bfd/qanda/utils/DateUtil.java
create mode 100644 src/main/java/com/bfd/qanda/utils/DownLoadUtil.java
create mode 100644 src/main/java/com/bfd/qanda/utils/EncryptionUtil.java
create mode 100644 src/main/java/com/bfd/qanda/utils/FileUtil.java
create mode 100644 src/main/java/com/bfd/qanda/utils/GPTResultParseUtil.java
create mode 100644 src/main/java/com/bfd/qanda/utils/JsonUtil.java
create mode 100644 src/main/java/com/bfd/qanda/utils/OtherUtils.java
create mode 100644 src/main/java/com/bfd/qanda/utils/PauseTool.java
create mode 100644 src/main/java/com/bfd/qanda/utils/QueueUtil.java
create mode 100644 src/main/java/com/bfd/qanda/utils/SpringBootKafka.java
create mode 100644 src/main/java/com/bfd/qanda/utils/ThrowMessageUtil.java
create mode 100644 src/main/resources/application.yml
create mode 100644 src/main/resources/logback-spring.xml
create mode 100644 src/test/java/com/bfd/AppTest.java
diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..1a0a8d2
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..69f78ae
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/logs/
+/target/
\ No newline at end of file
diff --git a/.project b/.project
new file mode 100644
index 0000000..7e8119b
--- /dev/null
+++ b/.project
@@ -0,0 +1,23 @@
+
+
+ minimax_model
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ org.eclipse.m2e.core.maven2Nature
+
+
diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..839d647
--- /dev/null
+++ b/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8
+encoding//src/test/java=UTF-8
+encoding/=UTF-8
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..71df522
--- /dev/null
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,9 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..c8554ed
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+接入minimax模型
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..060321c
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,286 @@
+
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.2.4.RELEASE
+
+ com.bfd
+ minimax_model
+ 0.0.1-SNAPSHOT
+
+ minimax_model
+
+ http://www.example.com
+
+
+ UTF-8
+ 1.8
+ 1.8
+
+
+
+
+ junit
+ junit
+ 4.11
+ test
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+ de.codecentric
+ spring-boot-admin-starter-client
+ 2.2.4
+
+
+ com.google.code.gson
+ gson
+ 2.8.8
+
+
+ org.springframework.boot
+ spring-boot-test
+
+
+
+ org.springframework
+ spring-test
+ 5.0.10.RELEASE
+ test
+
+
+ commons-io
+ commons-io
+ 2.11.0
+
+
+
+ com.alibaba
+ fastjson
+ 2.0.17
+
+
+
+ com.mchange
+ c3p0
+ 0.9.5.5
+
+
+
+ com.squareup.okhttp3
+ okhttp
+ 4.9.3
+
+
+ org.apache.httpcomponents
+ httpclient
+ 4.5.3
+
+
+ org.apache.httpcomponents
+ httpmime
+ 4.5.13
+
+
+ commons-lang
+ commons-lang
+ 2.6
+
+
+
+ org.jetbrains.kotlin
+ kotlin-reflect
+ 1.6.21
+ runtime
+
+
+
+ org.jsoup
+ jsoup
+ 1.8.1
+
+
+ org.apache.pdfbox
+ pdfbox
+ 2.0.28
+
+
+ org.apache.poi
+ poi-scratchpad
+ 4.0.1
+
+
+ org.apache.poi
+ poi
+ 4.0.1
+
+
+ org.apache.poi
+ poi-ooxml
+ 4.0.1
+
+
+
+ org.apache.logging.log4j
+ log4j-api
+ 2.14.1
+
+
+ org.apache.logging.log4j
+ log4j-core
+ 2.14.1
+
+
+
+ org.projectlombok
+ lombok
+
+
+
+
+
+
+
+ org.springframework.kafka
+ spring-kafka
+
+
+ cn.hutool
+ hutool-all
+ 5.8.5
+
+
+ junit
+ junit
+
+
+
+ p6spy
+ p6spy
+ 3.9.0
+
+
+
+ commons-collections
+ commons-collections
+ 3.2.2
+
+
+
+ org.redisson
+ redisson-spring-boot-starter
+ 3.13.6
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+ org.apache.curator
+ curator-framework
+ 5.2.0
+
+
+ org.apache.curator
+ curator-recipes
+ 5.2.0
+
+
+
+
+
+
+
+
+ maven-clean-plugin
+ 3.1.0
+
+
+
+ maven-resources-plugin
+ 3.0.2
+
+
+ maven-compiler-plugin
+ 3.8.0
+
+
+ maven-surefire-plugin
+ 2.22.1
+
+
+ maven-jar-plugin
+ 3.0.2
+
+
+ maven-install-plugin
+ 2.5.2
+
+
+ maven-deploy-plugin
+ 2.8.2
+
+
+
+ maven-site-plugin
+ 3.7.1
+
+
+ maven-project-info-reports-plugin
+ 3.0.0
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+ com.bfd.qanda.Application
+ ZIP
+
+
+ ${project.groupId}
+ ${project.artifactId}
+
+
+
+
+
+
+ repackage
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+ 3.1.1
+
+
+ copy
+ package
+
+ copy-dependencies
+
+
+ jar
+ jar
+ runtime
+ ${project.build.directory}/libs
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/bfd/qanda/Application.java b/src/main/java/com/bfd/qanda/Application.java
new file mode 100644
index 0000000..9c1d177
--- /dev/null
+++ b/src/main/java/com/bfd/qanda/Application.java
@@ -0,0 +1,24 @@
+package com.bfd.qanda;
+
+
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.kafka.annotation.EnableKafka;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+/**
+ * 主入口
+ *
+ * @author jian.mao
+ * @date 2023年7月4日
+ * @description
+ */
+@SpringBootApplication
+@EnableKafka
+public class Application {
+
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/bfd/qanda/cache/ConfigCache.java b/src/main/java/com/bfd/qanda/cache/ConfigCache.java
new file mode 100644
index 0000000..c18c4e0
--- /dev/null
+++ b/src/main/java/com/bfd/qanda/cache/ConfigCache.java
@@ -0,0 +1,37 @@
+package com.bfd.qanda.cache;
+
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.Map;
+import java.util.concurrent.LinkedBlockingDeque;
+
+/**
+ * @author jian.mao
+ * @date 2022年11月11日
+ * @description 静态变量类
+ */
+@Slf4j
+public class ConfigCache {
+
+ /**启动条件**/
+ public static boolean isStart = true;
+ /*****任务队列*****/
+ public static LinkedBlockingDeque