commit 2c0812be7b989e88a83fae3e29bea56f82b39260
Author: weiweiw <14335254+weiweiw22@user.noreply.gitee.com>
Date: Wed Oct 23 08:03:27 2024 +0800
first commit
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e9a196f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,16 @@
+*.log
+*.log.*
+*.bak
+logs
+**/target
+.idea/
+*.class
+*.manifest
+*.spec
+.DS_Store
+
+
+
+
+
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..bd95df1
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 若依
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..c3ffaf6
--- /dev/null
+++ b/README.md
@@ -0,0 +1,39 @@
+
+
+
+bonus v3.6.4
+基于 Vue/Element UI 和 Spring Boot/Spring Cloud & Alibaba 前后端分离的分布式微服务架构
+
+
+## 平台简介
+
+博诺思人工智能平台是基于博诺思微服务平台的轻量级系统,基于Spring Boot、Spring Cloud、Spring Cloud Alibaba、OAuth2.0、JWT、Redis、MyBatis、Shiro、Quartz、Swagger、EasyExcel、EasyPoi、Layui、Element UI、Vue、Nginx、Docker、Maven、Git、GitHub、Gitee、Jen
+
+博诺思微服务平台代码仓库:http://192.168.0.56:3000/bonus/Bonus-Cloud.git
+
+## 系统模块
+~~~
+com.bonus
+├── bonus-api // 接口模块
+│ └── bonus-ai-api-system // 系统接口
+├── bonus-modules // 业务模块
+│ └── bonus-ai // 人工智能平台系统模块
+├──pom.xml // 公共依赖
+~~~
+
+## 人工智能平台架构图
+
+
+
+## 软件版本要求
+~~~
+
+软件名称 版本要求 推荐版本
+JDK >= 1.8 1.8
+Mysql >= 5.7.0 5.7.0
+Redis >= 3.0 7.2.3
+nacos >= 2.0.4 2.1.0
+sentinel >= 1.6.0 1.8.7
+Maven >= 3.0 3.9.6
+Node >= 12 16.9.0
+~~~
diff --git a/bonus-ai-architecture.jpg b/bonus-ai-architecture.jpg
new file mode 100644
index 0000000..c1b3db7
Binary files /dev/null and b/bonus-ai-architecture.jpg differ
diff --git a/bonus-modules/bonus-ai/pom.xml b/bonus-modules/bonus-ai/pom.xml
new file mode 100644
index 0000000..228b4a6
--- /dev/null
+++ b/bonus-modules/bonus-ai/pom.xml
@@ -0,0 +1,123 @@
+
+
+
+ com.bonus
+ bonus-modules
+ 24.9.0-SNAPSHOT
+
+ 4.0.0
+
+ bonus-modules-ai
+
+
+ bonus-modules-ai服务
+
+
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-sentinel
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
+
+
+
+ com.mysql
+ mysql-connector-j
+
+
+
+
+ com.bonus
+ bonus-common-datasource
+
+
+
+ com.bonus
+ bonus-common-core
+
+
+
+
+ com.bonus
+ bonus-common-datascope
+
+
+ com.bonus
+ bonus-common-swagger
+
+
+ com.bonus
+ bonus-common-log
+
+
+
+
+ com.bonus
+ bonus-common-log
+
+
+
+
+ com.bonus
+ bonus-common-swagger
+
+
+ com.google.guava
+ guava
+ 30.0-jre
+ compile
+
+
+ com.bonus
+ bonus-common-security
+
+
+ com.google.code.gson
+ gson
+
+
+
+
+
+ ${project.artifactId}
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ repackage
+
+
+
+
+
+
+
+
+
diff --git a/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/BonusAIApplication.java b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/BonusAIApplication.java
new file mode 100644
index 0000000..a5f9a97
--- /dev/null
+++ b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/BonusAIApplication.java
@@ -0,0 +1,36 @@
+package com.bonus.ai;
+
+import com.bonus.common.security.annotation.EnableCustomConfig;
+import com.bonus.common.security.annotation.EnableRyFeignClients;
+import com.bonus.common.swagger.annotation.EnableCustomSwagger2;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+
+
+/**
+ * 文件服务
+ *
+ * @author bonus
+ */
+@EnableCustomConfig
+@EnableCustomSwagger2
+@EnableRyFeignClients
+@SpringBootApplication
+public class BonusAIApplication
+{
+ public static void main(String[] args)
+ {
+ SpringApplication.run(BonusAIApplication.class, args);
+ System.out.println("(♥◠‿◠)ノ゙ 人工智能服务启动成功 ლ(´ڡ`ლ)゙ \n" +
+ " .-------. ____ __ \n" +
+ " | _ _ \\ \\ \\ / / \n" +
+ " | ( ' ) | \\ _. / ' \n" +
+ " |(_ o _) / _( )_ .' \n" +
+ " | (_,_).' __ ___(_ o _)' \n" +
+ " | |\\ \\ | || |(_,_)' \n" +
+ " | | \\ `' /| `-' / \n" +
+ " | | \\ / \\ / \n" +
+ " ''-' `'-' `-..-' ");
+ }
+}
diff --git a/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/controller/AnnotationTaskController.java b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/controller/AnnotationTaskController.java
new file mode 100644
index 0000000..500757c
--- /dev/null
+++ b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/controller/AnnotationTaskController.java
@@ -0,0 +1,90 @@
+package com.bonus.ai.controller;
+
+import com.bonus.ai.domain.AiDataSet;
+import com.bonus.ai.domain.AnnotationTask;
+import com.bonus.ai.domain.ReleaseVersion;
+import com.bonus.common.core.web.domain.AjaxResult;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping("/task")
+public class AnnotationTaskController {
+
+ /**
+ * 获取所有的任务列表
+ * @return 返回所有的任务列表
+ */
+ @GetMapping("/list/")
+ public AjaxResult list() {
+ return AjaxResult.success();
+ }
+
+ /**
+ * 查看由我创建的任务
+ * @return 返回我创建的任务列表
+ */
+ @GetMapping("/list/created")
+ public AjaxResult getTasksCreatedByMe() {
+ return AjaxResult.success();
+ }
+
+ /**
+ * 查看由我参与的任务
+ * @return 返回我参与的任务列表
+ */
+
+ @GetMapping("/list/participated")
+ public AjaxResult getTasksParticipatedByMe() {
+ return AjaxResult.success();
+ }
+
+ /**
+ * 根据任务编号获取任务详情,如果是标注人员获取分配的文件列表,如果是审核人员获取所有分配的文件列表,如果是管理员获取所有文件列表
+ * @param taskId 任务编号
+ * @return 返回任务详情
+ */
+ @GetMapping(value = "/{taskId}")
+ public AjaxResult getInfo(@PathVariable Long taskId) {
+ return AjaxResult.success(new AnnotationTask());
+ }
+
+
+ /**发布任务
+ * @param version 发布任务的版本信息
+ * @return 返回影响的行数或错误信
+ */
+ @PostMapping("/release")
+ public AjaxResult release(@Validated @RequestBody ReleaseVersion version) {
+ return AjaxResult.success();
+ }
+
+ /**新增数据集
+ * @param task 新增的数据集信息
+ * @return 返回影响的行数或错误信
+ */
+ @PostMapping
+ public AjaxResult add(@Validated @RequestBody AnnotationTask task) {
+ return AjaxResult.success();
+ }
+
+ /**修改任务
+ * @param task 修改的任务
+ * @return 返回影响的行数或错误信
+ */
+ @PutMapping
+ public AjaxResult edit(@Validated @RequestBody AnnotationTask task) {
+ return AjaxResult.success();
+ }
+
+ /**
+ * 删除的任务
+ * @param taskId 修改的任务
+ * @return 返回影响的行数或错误信
+ */
+ @DeleteMapping("/{taskId}")
+ public AjaxResult remove(@PathVariable Long taskId) {
+ return AjaxResult.success();
+ }
+
+}
diff --git a/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/controller/AnnotationTeamController.java b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/controller/AnnotationTeamController.java
new file mode 100644
index 0000000..31f1dd5
--- /dev/null
+++ b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/controller/AnnotationTeamController.java
@@ -0,0 +1,57 @@
+package com.bonus.ai.controller;
+
+import com.bonus.ai.domain.AiDataSet;
+import com.bonus.ai.domain.AnnotationTeam;
+import com.bonus.common.core.web.domain.AjaxResult;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 标注人员管理控制层
+ * @author wangvivi
+ */
+
+@RestController
+@RequestMapping("/team")
+@Slf4j
+public class AnnotationTeamController {
+
+ /**
+ * 获取所有标注人员和审核人员
+ * @return 返回满足条件的数据集列表
+ */
+ @GetMapping("/list")
+ public AjaxResult list() {
+ return AjaxResult.success();
+ }
+
+ /**新增标注人员或审核人员
+ * @param team 新增的人员id和角色信息
+ * @return 返回影响的行数或错误信
+ */
+ @PostMapping
+ public AjaxResult add(@Validated @RequestBody AnnotationTeam team) {
+ return AjaxResult.success();
+ }
+
+ /**修改标注人员或审核人员
+ * @param team 修改的数据信息
+ * @return 返回影响的行数或错误信
+ */
+ @PutMapping
+ public AjaxResult edit(@Validated @RequestBody AnnotationTeam team) {
+ return AjaxResult.success();
+ }
+
+ /**
+ * 删除的team标注人员或审核人员
+ * @param team 删除的信息
+ * @return 返回影响的行数或错误信
+ */
+ @DeleteMapping
+ public AjaxResult remove(@Validated @RequestBody AnnotationTeam team) {
+ return AjaxResult.success();
+ }
+
+}
diff --git a/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/controller/BasicFileController.java b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/controller/BasicFileController.java
new file mode 100644
index 0000000..0a0b991
--- /dev/null
+++ b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/controller/BasicFileController.java
@@ -0,0 +1,78 @@
+package com.bonus.ai.controller;
+
+import com.bonus.common.core.web.domain.AjaxResult;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+* 基础文件管理控制层,获取指定存储方式的文件列表等
+* @author wangvivi
+ */
+@RestController
+@RequestMapping("/basicfile")
+@Slf4j
+public class BasicFileController {
+ /**
+ * 获取由我创建和公共文件的列表
+ * @return 返回所有的文件列表
+ */
+ @GetMapping("/list/")
+ public AjaxResult list() {
+ return AjaxResult.success();
+ }
+
+ /**
+ * 获取由我创建和公共文件树
+ * @return 返回所有的文件树
+ */
+ @GetMapping("/tree/")
+ public AjaxResult tree() {
+ return AjaxResult.success();
+ }
+
+ /**
+ * 创建文件夹
+ * @param folderName 单个文件
+ * @return 文件夹网络路径
+ */
+ @PostMapping("/createFolder")
+ @ApiOperation("创建文件夹")
+ public AjaxResult createFolder(@RequestParam("folderName") String folderName)
+ {
+ return AjaxResult.success("创建文件夹");
+ }
+
+ /**
+ * 文件夹删除
+ * 从各个存储平台删除文件
+ * @param folderName 文件夹名,默认为根目录
+ * @return 文件夹网络路径
+ */
+ @DeleteMapping("/deleteFolder")
+ public AjaxResult deleteFolder(@RequestParam("folderName") String folderName) {
+ return AjaxResult.success("文件夹删除成功");
+ }
+
+ /**
+ * 单文件上传到指定文件夹
+ * @param file 单个文件
+ * @return 文件信息,包括文件名和文件路径
+ */
+ @PostMapping("upload")
+ public AjaxResult upload(MultipartFile file, String folderName){
+ return AjaxResult.success("文件上传成功");
+ }
+
+ /**
+ * 多文件上传到指定文件夹
+ * @param files 多个文件流
+ * @return 文件信息
+ */
+ @PostMapping("/uploadFiles")
+ public AjaxResult uploadFile(MultipartFile[] files, String folderName) {
+ return AjaxResult.success("文件上传成功");
+ }
+
+}
diff --git a/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/controller/DatasetController.java b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/controller/DatasetController.java
new file mode 100644
index 0000000..2e5932e
--- /dev/null
+++ b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/controller/DatasetController.java
@@ -0,0 +1,85 @@
+package com.bonus.ai.controller;
+
+import com.bonus.ai.domain.AiDataSet;
+import com.bonus.ai.domain.ReleaseVersion;
+import com.bonus.common.core.web.domain.AjaxResult;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 数据集管理控制层,标注任务创建等
+ * @author wangvivi
+ */
+@RestController
+@RequestMapping("/dataset")
+@Slf4j
+public class DatasetController {
+ /**
+ * 查看由我创建的数据集和公共数据集
+ * @return 返回满足条件的数据集列表
+ */
+ @GetMapping("/list")
+ public AjaxResult list() {
+ return AjaxResult.success();
+ }
+
+ /**
+ * 根据数据集编号获取数据集详情
+ * @param datasetId 数据集编号
+ * @return 返回数据集详情
+ */
+ @GetMapping(value = "/{datasetId}")
+ public AjaxResult getInfo(@PathVariable Long datasetId) {
+ return AjaxResult.success(new AiDataSet());
+ }
+
+
+ /**发布数据集
+ * @param version 发布数据集的版本信息
+ * @return 返回影响的行数或错误信
+ */
+ @PostMapping("/release")
+ public AjaxResult release(@Validated @RequestBody ReleaseVersion version) {
+ return AjaxResult.success();
+ }
+
+ /**导出发布版本的数据集
+ * @param versionId 发布数据集的版本id
+ * @return 返回影响的行数或错误信
+ */
+ @GetMapping(value = "/export/{versionId}")
+ public AjaxResult export(@PathVariable Long versionId) {
+ return AjaxResult.success();
+ }
+
+ /**新增数据集
+ * @param dataSet 新增的数据集信息,并且建立和文件的关联关系
+ * @return 返回影响的行数或错误信
+ */
+ @PostMapping
+ public AjaxResult add(@Validated @RequestBody AiDataSet dataSet) {
+ return AjaxResult.success();
+ }
+
+ /**修改数据集
+ * @param dataSet 修改的数据集信息
+ * @return 返回影响的行数或错误信
+ */
+ @PutMapping
+ public AjaxResult edit(@Validated @RequestBody AiDataSet dataSet) {
+ return AjaxResult.success();
+ }
+
+ /**
+ * 删除的数据集
+ * @param dataSetId 修改的数据集信息
+ * @return 返回影响的行数或错误信
+ */
+ @DeleteMapping("/{dataSetId}")
+ public AjaxResult remove(@PathVariable Long dataSetId) {
+ return AjaxResult.success();
+ }
+
+
+}
diff --git a/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/controller/LabelController.java b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/controller/LabelController.java
new file mode 100644
index 0000000..ccc042e
--- /dev/null
+++ b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/controller/LabelController.java
@@ -0,0 +1,75 @@
+package com.bonus.ai.controller;
+
+import com.bonus.ai.domain.AiDataSet;
+import com.bonus.ai.domain.Label;
+import com.bonus.common.core.web.domain.AjaxResult;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 标签管理控制层
+ * @author wangvivi
+ */
+@RestController
+@RequestMapping("/label")
+@Slf4j
+public class LabelController {
+ /**
+ * 获取所有标签列表
+ * @return 返回所有的标签
+ */
+ @GetMapping("/list/")
+ public AjaxResult list() {
+ return AjaxResult.success();
+ }
+
+ /**
+ * 获取所有标签列表树
+ * @return 返回所有的标签树
+ */
+ @GetMapping("/tree")
+ public AjaxResult tree() {
+ return AjaxResult.success();
+ }
+
+ /**
+ * 根据标签编号获取标签详情
+ * @param labelId 标签编号
+ * @return 返回标签详情
+ */
+ @GetMapping(value = "/{labelId}")
+ public AjaxResult getInfo(@PathVariable Long labelId) {
+ return AjaxResult.success(new Label());
+ }
+
+ /**新增标签
+ * @param label 新增的标签信息
+ * @return 返回影响的行数或错误信
+ */
+ @PostMapping
+ public AjaxResult add(@Validated @RequestBody Label label) {
+ return AjaxResult.success();
+ }
+
+ /**修改标签
+ * @param label 修改的标签信息
+ * @return 返回影响的行数或错误信
+ */
+ @PutMapping
+ public AjaxResult edit(@Validated @RequestBody Label label) {
+ return AjaxResult.success();
+ }
+
+ /**
+ * 删除的标签
+ * @param labelId 修改的标签信息
+ * @return 返回影响的行数或错误信
+ */
+ @DeleteMapping("/{labelId}")
+ public AjaxResult remove(@PathVariable Long labelId) {
+ return AjaxResult.success();
+ }
+
+
+}
diff --git a/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/AiDataSet.java b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/AiDataSet.java
new file mode 100644
index 0000000..3209a8f
--- /dev/null
+++ b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/AiDataSet.java
@@ -0,0 +1,114 @@
+package com.bonus.ai.domain;
+
+import com.bonus.common.core.web.domain.BaseEntity;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 数据集类
+ * @author wangvivi
+ */
+public class AiDataSet extends BaseEntity {
+
+ /**数据集ID*/
+ private Long datasetId;
+ /**数据集名称*/
+ private String datasetName;
+ /**数据集描述*/
+ private String datasetDesc;
+ /** 数据类型:0图片,1视频 ,2音频,3自由格式*/
+ private String dataType;
+ private String inputPath;
+ private String outputPath;
+
+ /** 是否公开(0代表未标注 1代表已标注)*/
+ private String annotationStatus;
+
+ /** 是否公开(0代表不公开 1代表公开)*/
+ private String isPublic;
+ /**删除标志(0代表存在 1代表删除) */
+ private String delFlag;
+
+ private List files;
+
+ public Long getDatasetId() {
+ return datasetId;
+ }
+
+ public void setDatasetId(Long datasetId) {
+ this.datasetId = datasetId;
+ }
+
+ public String getDatasetName() {
+ return datasetName;
+ }
+
+ public void setDatasetName(String datasetName) {
+ this.datasetName = datasetName;
+ }
+
+ public String getDatasetDesc() {
+ return datasetDesc;
+ }
+
+ public void setDatasetDesc(String datasetDesc) {
+ this.datasetDesc = datasetDesc;
+ }
+
+ public String getDataType() {
+ return dataType;
+ }
+
+ public void setDataType(String dataType) {
+ this.dataType = dataType;
+ }
+
+ public String getInputPath() {
+ return inputPath;
+ }
+
+ public void setInputPath(String inputPath) {
+ this.inputPath = inputPath;
+ }
+
+ public String getOutputPath() {
+ return outputPath;
+ }
+
+ public void setOutputPath(String outputPath) {
+ this.outputPath = outputPath;
+ }
+
+ public String getIsPublic() {
+ return isPublic;
+ }
+
+ public void setIsPublic(String isPublic) {
+ this.isPublic = isPublic;
+ }
+
+ public String getDelFlag() {
+ return delFlag;
+ }
+
+ public void setDelFlag(String delFlag) {
+ this.delFlag = delFlag;
+ }
+
+ public List getFiles() {
+ return files;
+ }
+
+ public void setFiles(List files) {
+ this.files = files;
+ }
+
+ public String getAnnotationStatus() {
+ return annotationStatus;
+ }
+
+ public void setAnnotationStatus(String annotationStatus) {
+ this.annotationStatus = annotationStatus;
+ }
+}
diff --git a/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/AnnotationTask.java b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/AnnotationTask.java
new file mode 100644
index 0000000..bd8cb56
--- /dev/null
+++ b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/AnnotationTask.java
@@ -0,0 +1,159 @@
+package com.bonus.ai.domain;
+
+import com.bonus.ai.domain.enums.AnnotationFileStatus;
+import com.bonus.ai.domain.enums.AnnotationTaskStatus;
+import com.bonus.common.core.web.domain.BaseEntity;
+
+import java.util.List;
+
+public class AnnotationTask extends BaseEntity {
+
+ /**任务名称*/
+ private Long taskId;
+ /**数据集id*/
+ private Long datasetId;
+ /**标注团队id,为0表示未启用标注团队,否则启用标注团队的关联id*/
+ private Long annotationTeamId;
+ /**任务名称*/
+ private String taskName;
+ /**任务描述*/
+ private String taskDesc;
+ /**标注场景 数据类型:0图片,1视频 ,2音频,3自由格式*/
+ private String annotateScene;
+ /**标注类型:图像分类,物体检测等*/
+ private String annotateType;
+ /**标签集合,标签之间用逗号分隔*/
+ private String labels;
+
+ AnnotationTaskStatus annotateTaskStatus;
+
+ /**删除标志(0代表存在 1代表删除) */
+ private String delFlag;
+
+ /**标注人员列表*/
+ private List annotators;
+
+ /**审核人员列表*/
+ private List reviewers;
+
+ public class SubTask{
+ /**标注人员id*/
+ private Long annotatorId;
+ /**审核人员id*/
+ private Long reviewerId;
+ /**文件id*/
+ private Long fileId;
+
+ /**文件标注状态*/
+ private AnnotationFileStatus annotateFileStatus;
+ /**标注结果*/
+ private String annotationResult;
+ /**标注来源,0人工标注,1智能标注*/
+ private String annotationSource;
+
+ /**标注时间*/
+ private java.util.Date annotationTime;
+ /**审核时间*/
+ private java.util.Date reviewTime;;
+ }
+
+ /**分配后子任务*/
+ private List subAnnotationTasks;
+
+ public List getReviewers() {
+ return reviewers;
+ }
+
+ public void setReviewers(List reviewers) {
+ this.reviewers = reviewers;
+ }
+
+ public List getAnnotators() {
+ return annotators;
+ }
+
+ public void setAnnotators(List annotators) {
+ this.annotators = annotators;
+ }
+
+ public List getSubAnnotationTasks() {
+ return subAnnotationTasks;
+ }
+
+ public void setSubAnnotationTasks(List subAnnotationTasks) {
+ this.subAnnotationTasks = subAnnotationTasks;
+ }
+
+
+ public Long getTaskId() {
+ return taskId;
+ }
+
+ public void setTaskId(Long taskId) {
+ this.taskId = taskId;
+ }
+
+ public Long getDatasetId() {
+ return datasetId;
+ }
+
+ public void setDatasetId(Long datasetId) {
+ this.datasetId = datasetId;
+ }
+
+ public Long getAnnotationTeamId() {
+ return annotationTeamId;
+ }
+
+ public void setAnnotationTeamId(Long annotationTeamId) {
+ this.annotationTeamId = annotationTeamId;
+ }
+
+ public String getTaskName() {
+ return taskName;
+ }
+
+ public void setTaskName(String taskName) {
+ this.taskName = taskName;
+ }
+
+ public String getTaskDesc() {
+ return taskDesc;
+ }
+
+ public void setTaskDesc(String taskDesc) {
+ this.taskDesc = taskDesc;
+ }
+
+ public String getAnnotateScene() {
+ return annotateScene;
+ }
+
+ public void setAnnotateScene(String annotateScene) {
+ this.annotateScene = annotateScene;
+ }
+
+ public String getAnnotateType() {
+ return annotateType;
+ }
+
+ public void setAnnotateType(String annotateType) {
+ this.annotateType = annotateType;
+ }
+
+ public String getLabels() {
+ return labels;
+ }
+
+ public void setLabels(String labels) {
+ this.labels = labels;
+ }
+
+ public String getDelFlag() {
+ return delFlag;
+ }
+
+ public void setDelFlag(String delFlag) {
+ this.delFlag = delFlag;
+ }
+}
diff --git a/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/AnnotationTeam.java b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/AnnotationTeam.java
new file mode 100644
index 0000000..eb431f6
--- /dev/null
+++ b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/AnnotationTeam.java
@@ -0,0 +1,17 @@
+package com.bonus.ai.domain;
+
+import com.bonus.common.core.web.domain.BaseEntity;
+import com.bonus.system.api.domain.SysUser;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author wangvivi
+ */
+public class AnnotationTeam extends BaseEntity{
+
+ private Long userId;
+ /**0标注,1审核*/
+ private String roleId;
+}
diff --git a/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/BasicFile.java b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/BasicFile.java
new file mode 100644
index 0000000..a18d40f
--- /dev/null
+++ b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/BasicFile.java
@@ -0,0 +1,112 @@
+package com.bonus.ai.domain;
+
+import com.bonus.common.core.web.domain.BaseEntity;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class BasicFile extends BaseEntity {
+ private Long fileId;
+ private String fileName;
+ private String filePath;
+ private Long fileSize;
+ /**文件最后修改时间*/
+ private java.util.Date lastModifyTime;
+ /**上传时间*/
+ private java.util.Date uploadTime;;
+ /** 是否公开(0代表不公开 1代表公开)*/
+ private String isPublic;
+
+ /**文件的标签集合 */
+ private List labels;
+
+ /** 删除标志(0代表存在 2代表删除) */
+ private String delFlag;
+
+ /** 父节点名称 */
+ private String parentName;
+
+ /** 子部门 */
+ private List children = new ArrayList();
+
+ public Long getFileId() {
+ return fileId;
+ }
+
+ public void setFileId(Long fileId) {
+ this.fileId = fileId;
+ }
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+
+ public String getFilePath() {
+ return filePath;
+ }
+
+ public void setFilePath(String filePath) {
+ this.filePath = filePath;
+ }
+
+ public Long getFileSize() {
+ return fileSize;
+ }
+
+ public void setFileSize(Long fileSize) {
+ this.fileSize = fileSize;
+ }
+
+ public Date getLastModifyTime() {
+ return lastModifyTime;
+ }
+
+ public void setLastModifyTime(Date lastModifyTime) {
+ this.lastModifyTime = lastModifyTime;
+ }
+
+ public Date getUploadTime() {
+ return uploadTime;
+ }
+
+ public void setUploadTime(Date uploadTime) {
+ this.uploadTime = uploadTime;
+ }
+
+ public String getIsPublic() {
+ return isPublic;
+ }
+
+ public void setIsPublic(String isPublic) {
+ this.isPublic = isPublic;
+ }
+
+ public String getDelFlag() {
+ return delFlag;
+ }
+
+ public void setDelFlag(String delFlag) {
+ this.delFlag = delFlag;
+ }
+
+ public String getParentName() {
+ return parentName;
+ }
+
+ public void setParentName(String parentName) {
+ this.parentName = parentName;
+ }
+
+ public List getChildren() {
+ return children;
+ }
+
+ public void setChildren(List children) {
+ this.children = children;
+ }
+}
diff --git a/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/Label.java b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/Label.java
new file mode 100644
index 0000000..1189da9
--- /dev/null
+++ b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/Label.java
@@ -0,0 +1,62 @@
+package com.bonus.ai.domain;
+
+import com.bonus.common.core.web.domain.BaseEntity;
+
+import java.util.ArrayList;
+import java.util.List;
+/**
+ * 标签类
+ * @author wangvivi
+ */
+public class Label extends BaseEntity {
+ private Long labelId;
+ private String labelName;
+ /** 删除标志(0代表存在 2代表删除) */
+ private String delFlag;
+
+ /** 父节点名称 */
+ private String parentName;
+
+ /** 子部门 */
+ private List children = new ArrayList();
+
+ public Long getLabelId() {
+ return labelId;
+ }
+
+ public void setLabelId(Long labelId) {
+ this.labelId = labelId;
+ }
+
+ public String getLabelName() {
+ return labelName;
+ }
+
+ public void setLabelName(String labelName) {
+ this.labelName = labelName;
+ }
+
+ public String getDelFlag() {
+ return delFlag;
+ }
+
+ public void setDelFlag(String delFlag) {
+ this.delFlag = delFlag;
+ }
+
+ public String getParentName() {
+ return parentName;
+ }
+
+ public void setParentName(String parentName) {
+ this.parentName = parentName;
+ }
+
+ public List getChildren() {
+ return children;
+ }
+
+ public void setChildren(List children) {
+ this.children = children;
+ }
+}
diff --git a/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/ReleaseVersion.java b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/ReleaseVersion.java
new file mode 100644
index 0000000..21a08ba
--- /dev/null
+++ b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/ReleaseVersion.java
@@ -0,0 +1,80 @@
+package com.bonus.ai.domain;
+
+import com.bonus.common.core.web.domain.BaseEntity;
+
+import java.util.List;
+
+/**
+ * 版本类
+ * @author wangvivi
+ */
+public class ReleaseVersion extends BaseEntity {
+ /**版本ID*/
+ private Long versionId;
+ /**版本名称*/
+ private String versionName;
+ /**版本描述*/
+ private String versionDesc;
+ /**版本关联的数据集id*/
+ private Long datasetId;
+ /**版本关联的任务id*/
+ private Long taskId;
+
+ /**版本关联的文件标注结果和原始文件信息*/
+ private List fileAnnotationResultList;
+
+ public Long getVersionId() {
+ return versionId;
+ }
+
+ public void setVersionId(Long versionId) {
+ this.versionId = versionId;
+ }
+
+ public String getVersionName() {
+ return versionName;
+ }
+
+ public void setVersionName(String versionName) {
+ this.versionName = versionName;
+ }
+
+ public String getVersionDesc() {
+ return versionDesc;
+ }
+
+ public void setVersionDesc(String versionDesc) {
+ this.versionDesc = versionDesc;
+ }
+
+ public Long getDatasetId() {
+ return datasetId;
+ }
+
+ public void setDatasetId(Long datasetId) {
+ this.datasetId = datasetId;
+ }
+
+ public Long getTaskId() {
+ return taskId;
+ }
+
+ public void setTaskId(Long taskId) {
+ this.taskId = taskId;
+ }
+
+ public List getFileAnnotationResultList() {
+ return fileAnnotationResultList;
+ }
+
+ public void setFileAnnotationResultList(List fileAnnotationResultList) {
+ this.fileAnnotationResultList = fileAnnotationResultList;
+ }
+
+ public static class AnnotationResult{
+ /**文件id*/
+ private Long fileId;
+ /**标注结果*/
+ private String annotationResult;
+ }
+}
diff --git a/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/enums/AnnotationFileStatus.java b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/enums/AnnotationFileStatus.java
new file mode 100644
index 0000000..67ae043
--- /dev/null
+++ b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/enums/AnnotationFileStatus.java
@@ -0,0 +1,25 @@
+package com.bonus.ai.domain.enums;
+
+/**
+ * 标注文件状态
+ * @author wangvivi
+ */
+public enum AnnotationFileStatus {
+ /**标注文件状态*/
+ NOT_ANNOTATED("0", "未标注",""),
+
+ ANNOTATED("1","已标注",""),
+ /**启用标注团队时使用*/
+ REVIEWED("2","已审核", ""),
+ /**启用标注团队时使用*/
+ PENDING_MODIFICATION("3","审核后驳回" , "reason");
+
+ AnnotationFileStatus(String number, String status, String reason) {
+ }
+ private String number;
+ private String status;
+ private String reason;
+ public String getNumber() {return number;}
+ public String getStatus() {return status;}
+ public String getReason() {return reason;}
+}
diff --git a/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/enums/AnnotationTaskStatus.java b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/enums/AnnotationTaskStatus.java
new file mode 100644
index 0000000..2317c5c
--- /dev/null
+++ b/bonus-modules/bonus-ai/src/main/java/com/bonus/ai/domain/enums/AnnotationTaskStatus.java
@@ -0,0 +1,23 @@
+package com.bonus.ai.domain.enums;
+
+/**
+ * 标注任务状态
+ * @author wangvivi
+ */
+public enum AnnotationTaskStatus {
+ /**标注任务状态*/
+ NOT_ANNOTATED("0","未标注"),
+ IN_ANNOTATION("1","正在标注"),
+ ANNOTATED("2","已标注"),
+ /**启用标注团队时使用*/
+ IN_REVIEWING("3","正在审核"),
+ /**启用标注团队时使用*/
+ REVIEWED ("4","已审核");
+
+ AnnotationTaskStatus(String code, String status) {
+ }
+ private String code;
+ private String status;
+ public String getCode() {return code;}
+ public String getStatus() {return status;}
+}
diff --git a/bonus-modules/bonus-ai/src/main/resources/banner.txt b/bonus-modules/bonus-ai/src/main/resources/banner.txt
new file mode 100644
index 0000000..27cacb9
--- /dev/null
+++ b/bonus-modules/bonus-ai/src/main/resources/banner.txt
@@ -0,0 +1,10 @@
+Spring Boot Version: ${spring-boot.version}
+Spring Application Name: ${spring.application.name}
+ _ __ _ _
+ (_) / _|(_)| |
+ _ __ _ _ ___ _ _ _ ______ | |_ _ | | ___
+| '__|| | | | / _ \ | | | || ||______|| _|| || | / _ \
+| | | |_| || (_) || |_| || | | | | || || __/
+|_| \__,_| \___/ \__, ||_| |_| |_||_| \___|
+ __/ |
+ |___/
\ No newline at end of file
diff --git a/bonus-modules/bonus-ai/src/main/resources/bootstrap.yml b/bonus-modules/bonus-ai/src/main/resources/bootstrap.yml
new file mode 100644
index 0000000..a775e2d
--- /dev/null
+++ b/bonus-modules/bonus-ai/src/main/resources/bootstrap.yml
@@ -0,0 +1,35 @@
+# Tomcat
+server:
+ port: 18083
+# Spring
+spring:
+ servlet:
+ multipart:
+ # 文件最大
+ max-file-size: 20MB
+ # 设置总上传数据总大小
+ max-request-size: 20MB
+ application:
+ # 应用名称
+ name: bonus-ai
+ profiles:
+ # 环境配置
+ active: dev
+ cloud:
+ nacos:
+ username: nacos
+ password: nacos
+ discovery:
+ # 服务注册地址
+ server-addr: 192.168.0.14:8848
+ namespace: 0cc70924-d088-4723-84c7-3d9a464e1bc3
+ config:
+ # 配置中心地址
+ server-addr: 192.168.0.14:8848
+ namespace: 0cc70924-d088-4723-84c7-3d9a464e1bc3
+ # 配置文件格式
+ file-extension: yml
+ # 共享配置
+ shared-configs:
+ - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+
diff --git a/bonus-modules/bonus-ai/src/main/resources/logback.xml b/bonus-modules/bonus-ai/src/main/resources/logback.xml
new file mode 100644
index 0000000..7c7bf48
--- /dev/null
+++ b/bonus-modules/bonus-ai/src/main/resources/logback.xml
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+ ${log.pattern}
+
+
+
+
+
+ ${log.path}/info.log
+
+
+
+ ${log.path}/info.%d{yyyy-MM-dd}.log
+
+ 60
+
+
+ ${log.pattern}
+
+
+
+ INFO
+
+ ACCEPT
+
+ DENY
+
+
+
+
+ ${log.path}/error.log
+
+
+
+ ${log.path}/error.%d{yyyy-MM-dd}.log
+
+ 60
+
+
+ ${log.pattern}
+
+
+
+ ERROR
+
+ ACCEPT
+
+ DENY
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scripts/ai_bootstrap.yml b/scripts/ai_bootstrap.yml
new file mode 100644
index 0000000..ba8afb9
--- /dev/null
+++ b/scripts/ai_bootstrap.yml
@@ -0,0 +1,35 @@
+# Tomcat
+server:
+ port: 18097
+# Spring
+spring:
+ servlet:
+ multipart:
+ # 文件最大
+ max-file-size: 20MB
+ # 设置总上传数据总大小
+ max-request-size: 20MB
+ application:
+ # 应用名称
+ name: bonus-ai
+ profiles:
+ # 环境配置
+ active: dev
+ cloud:
+ nacos:
+ username: nacos
+ password: nacos
+ discovery:
+ # 服务注册地址
+ server-addr: 192.168.0.56:8848
+ namespace: 39c95294-eb64-4096-ada1-30a215bdd511
+ config:
+ # 配置中心地址
+ server-addr: 192.168.0.56:8848
+ namespace: 39c95294-eb64-4096-ada1-30a215bdd511
+ # 配置文件格式
+ file-extension: yml
+ # 共享配置
+ shared-configs:
+ - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+
diff --git a/scripts/auth_bootstrap.yml b/scripts/auth_bootstrap.yml
new file mode 100755
index 0000000..ce4f8f8
--- /dev/null
+++ b/scripts/auth_bootstrap.yml
@@ -0,0 +1,35 @@
+# Tomcat
+server:
+ port: 18091
+
+# Spring
+spring:
+ application:
+ # 应用名称
+ name: bonus-auth
+ profiles:
+ # 环境配置
+ active: dev
+ cloud:
+ nacos:
+ username: nacos
+ password: nacos
+ discovery:
+ # 服务注册地址
+ server-addr: 192.168.0.56:8848
+ namespace: 39c95294-eb64-4096-ada1-30a215bdd511
+ config:
+ # 配置中心地址
+ server-addr: 192.168.0.56:8848
+ namespace: 39c95294-eb64-4096-ada1-30a215bdd511
+ # 配置文件格式
+ file-extension: yml
+ # 共享配置
+ shared-configs:
+ - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+
+#加密组件
+jasypt:
+ encryptor:
+ password: Encrypt
+
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
new file mode 100755
index 0000000..c2f10a4
--- /dev/null
+++ b/scripts/deploy.sh
@@ -0,0 +1,87 @@
+#!/bin/bash
+
+export deploy_path=/opt/webapps/bonus-ai
+
+export app_workspace=/home/jenkins/workspace/Bonus-Cloud
+export ai_workspace=/home/jenkins/workspace/Bonus-AI-Cloud
+
+suffix="-ai"
+
+
+app_source_jars=(
+ "bonus-auth/target/bonus-auth.jar"
+ "bonus-gateway/target/bonus-gateway.jar"
+ "bonus-modules/bonus-file/target/bonus-file.jar"
+ "bonus-modules/bonus-gen/target/bonus-gen.jar"
+ "bonus-modules/bonus-job/target/bonus-job.jar"
+ "bonus-modules/bonus-oss/target/bonus-oss.jar"
+ "bonus-modules/bonus-system/target/bonus-system.jar"
+ "bonus-visual/bonus-monitor/target/bonus-visual-monitor.jar"
+)
+
+#for source_jar in "${app_source_jars[@]}"; do
+# cp -f ${app_workspace}/${source_jar} $deploy_path
+# echo "copied ${app_workspace}/${source_jar} to $deploy_path"
+#done
+for source_jar in "${app_source_jars[@]}"; do
+ # 获取文件名(不带目录路径)
+ filename=$(basename "$source_jar")
+ echo "filename:$filename"
+ # 获取文件名(不带扩展名)
+ base_name="${filename%.jar}"
+ echo "filename:$base_name"
+ # 构造新的文件名
+ new_filename="${base_name}${suffix}.jar"
+ echo "filename:$new_filename"
+
+ cp -f ${app_workspace}/${source_jar} "$deploy_path/$new_filename"
+ echo "copied ${app_workspace}/${source_jar} to '$deploy_path/$new_filename'"
+done
+
+cp -f ${ai_workspace}/"bonus-modules/bonus-ai/target/bonus-modules-ai.jar" $deploy_path
+echo "copied ${app_workspace}/${source_jar} to $deploy_path"
+
+# Define an array of JAR files to run
+jars=("bonus-auth-ai.jar --spring.config.location=file:auth_bootstrap.yml"
+"bonus-gateway-ai.jar --spring.config.location=file:gateway_bootstrap.yml"
+"bonus-system-ai.jar --spring.config.location=file:system_bootstrap.yml"
+"bonus-gen-ai.jar --spring.config.location=file:gen_bootstrap.yml"
+"bonus-job-ai.jar --spring.config.location=file:job_bootstrap.yml"
+"bonus-file-ai.jar --spring.config.location=file:file_bootstrap.yml"
+"bonus-visual-monitor-ai.jar --spring.config.location=file:visual_bootstrap.yml"
+"bonus-modules-ai.jar --spring.config.location=file:ai_bootstrap.yml")
+
+# 遍历数组并检查每个JAR文件的进程
+for jar_with_args in "${jars[@]}"; do
+ # 提取JAR文件名(不包括参数)
+ jar=$(echo $jar_with_args | awk '{print $1}')
+
+ # 检查进程是否启动
+ echo "原应用程序1 $jar "
+ pids=$(pgrep -f $jar || true)
+ echo "原应用程序2 $jar "
+ if [ -n "$pids" ]; then
+ echo "$jar is running with PID(s): $pids"
+ # 杀死进程
+ for pid in $pids; do
+ kill -9 $pid
+ if [ $? -eq 0 ]; then
+ echo "Process $pid for $jar killed successfully"
+ else
+ echo "Failed to kill process $pid for $jar"
+ fi
+ done
+ else
+ echo "$jar is not running"
+ fi
+done
+
+cd $deploy_path || { echo "Failed to change directory to $deploy_path"; exit 1; }
+# Iterate over the JAR files array
+for jar in "${jars[@]}"; do
+ echo "Starting $jar"
+ nohup /usr/lib/jvm/jdk1.8.0_381/bin/java -jar $jar >/dev/null 2>&1 &
+done
+
+echo "All JARs have been run successfully."
+
diff --git a/scripts/file_bootstrap.yml b/scripts/file_bootstrap.yml
new file mode 100755
index 0000000..3a7bd48
--- /dev/null
+++ b/scripts/file_bootstrap.yml
@@ -0,0 +1,29 @@
+# Tomcat
+server:
+ port: 18093
+
+# Spring
+spring:
+ application:
+ # 应用名称
+ name: bonus-file
+ profiles:
+ # 环境配置
+ active: dev
+ cloud:
+ nacos:
+ username: nacos
+ password: nacos
+ discovery:
+ # 服务注册地址
+ server-addr: 192.168.0.56:8848
+ namespace: 39c95294-eb64-4096-ada1-30a215bdd511
+ config:
+ # 配置中心地址
+ server-addr: 192.168.0.56:8848
+ namespace: 39c95294-eb64-4096-ada1-30a215bdd511
+ # 配置文件格式
+ file-extension: yml
+ # 共享配置
+ shared-configs:
+ - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
diff --git a/scripts/gateway_bootstrap.yml b/scripts/gateway_bootstrap.yml
new file mode 100755
index 0000000..1f0912b
--- /dev/null
+++ b/scripts/gateway_bootstrap.yml
@@ -0,0 +1,58 @@
+# Tomcat
+server:
+ port: 18090
+ servlet:
+ context-path: zhgd
+# Spring
+spring:
+ application:
+ # 应用名称
+ name: bonus-gateway
+ profiles:
+ # 环境配置
+ active: dev
+ cloud:
+ nacos:
+ username: nacos
+ password: nacos
+ discovery:
+ # 服务注册地址
+ server-addr: 192.168.0.56:8848
+ namespace: 39c95294-eb64-4096-ada1-30a215bdd511
+ config:
+ # 配置中心地址
+ server-addr: 192.168.0.56:8848
+ namespace: 39c95294-eb64-4096-ada1-30a215bdd511
+ # 配置文件格式
+ file-extension: yml
+ # 共享配置
+ shared-configs:
+ - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+ sentinel:
+ # 取消控制台懒加载
+ eager: true
+ transport:
+ # 控制台地址
+ dashboard: 192.168.0.14:18858
+ # nacos配置持久化
+ datasource:
+ ds1:
+ nacos:
+ username: nacos
+ password: nacos
+ server-addr: 192.168.0.56:8848
+ namespace: 39c95294-eb64-4096-ada1-30a215bdd511
+ dataId: sentinel-bonus-gateway
+ groupId: DEFAULT_GROUP
+ data-type: json
+ rule-type: gw-flow
+
+
+#系统 自动 加解密开关
+system:
+ encryptEnabled: false
+ decryptEnabled: true
+#加密组件
+jasypt:
+ encryptor:
+ password: Encrypt
\ No newline at end of file
diff --git a/scripts/gen_bootstrap.yml b/scripts/gen_bootstrap.yml
new file mode 100755
index 0000000..b11c4d1
--- /dev/null
+++ b/scripts/gen_bootstrap.yml
@@ -0,0 +1,29 @@
+# Tomcat
+server:
+ port: 18094
+
+# Spring
+spring:
+ application:
+ # 应用名称
+ name: bonus-gen
+ profiles:
+ # 环境配置
+ active: dev
+ cloud:
+ nacos:
+ username: nacos
+ password: nacos
+ discovery:
+ # 服务注册地址
+ server-addr: 192.168.0.56:8848
+ namespace: 39c95294-eb64-4096-ada1-30a215bdd511
+ config:
+ # 配置中心地址
+ server-addr: 192.168.0.56:8848
+ namespace: 39c95294-eb64-4096-ada1-30a215bdd511
+ # 配置文件格式
+ file-extension: yml
+ # 共享配置
+ shared-configs:
+ - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
diff --git a/scripts/job_bootstrap.yml b/scripts/job_bootstrap.yml
new file mode 100755
index 0000000..f851c7f
--- /dev/null
+++ b/scripts/job_bootstrap.yml
@@ -0,0 +1,29 @@
+# Tomcat
+server:
+ port: 18095
+
+# Spring
+spring:
+ application:
+ # 应用名称
+ name: bonus-job
+ profiles:
+ # 环境配置
+ active: dev
+ cloud:
+ nacos:
+ username: nacos
+ password: nacos
+ discovery:
+ # 服务注册地址
+ server-addr: 192.168.0.56:8848
+ namespace: 39c95294-eb64-4096-ada1-30a215bdd511
+ config:
+ # 配置中心地址
+ server-addr: 192.168.0.56:8848
+ namespace: 39c95294-eb64-4096-ada1-30a215bdd511
+ # 配置文件格式
+ file-extension: yml
+ # 共享配置
+ shared-configs:
+ - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
diff --git a/scripts/system_bootstrap.yml b/scripts/system_bootstrap.yml
new file mode 100755
index 0000000..58c1c46
--- /dev/null
+++ b/scripts/system_bootstrap.yml
@@ -0,0 +1,33 @@
+# Tomcat
+server:
+ port: 18092
+
+# Spring
+spring:
+ application:
+ # 应用名称
+ name: bonus-system
+ profiles:
+ # 环境配置
+ active: dev
+ cloud:
+ nacos:
+ username: nacos
+ password: nacos
+ discovery:
+ # 服务注册地址
+ server-addr: 192.168.0.56:8848
+ namespace: 39c95294-eb64-4096-ada1-30a215bdd511
+ config:
+ # 配置中心地址
+ server-addr: 192.168.0.56:8848
+ namespace: 39c95294-eb64-4096-ada1-30a215bdd511
+ # 配置文件格式
+ file-extension: yml
+ # 共享配置
+ shared-configs:
+ - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+system:
+ supports:
+ phoneLogin: true
+ emailLogin: true
\ No newline at end of file
diff --git a/scripts/visual_bootstrap.yml b/scripts/visual_bootstrap.yml
new file mode 100755
index 0000000..09a5853
--- /dev/null
+++ b/scripts/visual_bootstrap.yml
@@ -0,0 +1,29 @@
+# Tomcat
+server:
+ port: 18096
+
+# Spring
+spring:
+ application:
+ # 应用名称
+ name: bonus-monitor
+ profiles:
+ # 环境配置
+ active: dev
+ cloud:
+ nacos:
+ username: nacos
+ password: nacos
+ discovery:
+ # 服务注册地址
+ server-addr: 192.168.0.56:8848
+ namespace: 39c95294-eb64-4096-ada1-30a215bdd511
+ config:
+ # 配置中心地址
+ server-addr: 192.168.0.56:8848
+ namespace: 39c95294-eb64-4096-ada1-30a215bdd511
+ # 配置文件格式
+ file-extension: yml
+ # 共享配置
+ shared-configs:
+ - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
diff --git a/sql/bonus_ai.sql b/sql/bonus_ai.sql
new file mode 100644
index 0000000..2202d8d
--- /dev/null
+++ b/sql/bonus_ai.sql
@@ -0,0 +1,262 @@
+SET NAMES utf8mb4;
+
+drop table if exists ai_service;
+/*==============================================================*/
+/* Table: ai_service */
+/*==============================================================*/
+create table ai_service
+(
+ service_id bigint(20) not null comment '服务主键id',
+ service_name varchar(30) comment '服务名称',
+ service_descrip varchar(100) comment '服务描述',
+ create_by varchar(64) not null comment '创建者',
+ create_time datetime default NULL comment '创建时间',
+ update_by varchar(64) not null comment '更新者',
+ update_time datetime default NULL comment '更新时间',
+ del_flag char(1) comment '是否删除(0代表存在 2代表删除)',
+ primary key (service_id)
+)engine=innodb comment = '服务表';
+insert into ai_service values(1, '身份证识别', '身份证识别', 'admin', sysdate(), '', null ,'0');
+insert into ai_service values(2, '发票识别', '发票识别', 'admin', sysdate(), '', null,'0');
+insert into ai_service values(3, '文本识别', '文本识别', 'admin', sysdate(), '', null,'0');
+insert into ai_service values(4, '人脸识别', '人脸识别', 'admin', sysdate(), '', null,'0');
+insert into ai_service values(5, '违章识别', '违章识别', 'admin', sysdate(), '',null ,'0');;
+
+
+drop table if exists ai_idcardrecognize_result;
+
+/*==============================================================*/
+/* Table: ai_idcardrecognize_result */
+/*==============================================================*/
+create table ai_idcardrecognize_result
+(
+ result_id bigint(20) not null auto_increment comment '结果id',
+ service_id bigint(20) comment '服务主键id',
+ name varchar(60) comment '姓名',
+ sex char(2) default '男' comment '性别(男,女,其他)',
+ enthnic varchar(20) comment '名族',
+ birthday varchar(30) comment '出生',
+ address varchar(100) comment '住址',
+ idcard_number varchar(20) comment '身份证号',
+ issuing_authority varchar(60) comment '签发机关',
+ idcard_validity varchar(60) comment '有效期',
+ if_complete char(2) default '是' comment '识别是否完整(是或否)',
+ frontImge_address varchar(100) comment '正面原始图片路径',
+ backImg_address varchar(100) comment '反面原始图片路径',
+ recognize_time datetime comment '识别时间',
+ response_long long comment '响应时长(单位秒)',
+ invoke_ip varchar(60) comment '调用服务IP',
+ update_by varchar(30) not null comment '更新者',
+ update_time datetime default NULL comment '更新时间',
+ del_flag char(1) default '0' comment '是否删除(0代表存在,2代表删除)',
+ result_type char(1) default '0' comment '结果类型(0用户登录,1服务注册)',
+ result_status char(1) default '0' comment '识别状态(0成功,1失败)',
+ failure_reason varchar(100) comment '识别失败原因',
+ primary key (result_id)
+)engine=innodb comment = '身份证识别结果表';
+
+drop table if exists ai_facerecognize_result;
+
+/*==============================================================*/
+/* Table: ocr_facerecognize_result */
+/*==============================================================*/
+create table ai_facerecognize_result
+(
+ result_id bigint(20) not null auto_increment comment '结果主键id',
+ face_id bigint(20) comment '人脸库表id',
+ service_id bigint(20) comment '服务id',
+ result_it varchar(64) comment '识别结果',
+ face_address varchar(100) comment '人脸路径',
+ recognize_time datetime comment '识别时间',
+ response_long long comment '响应时长',
+ invoke_ip varchar(60) comment '调用服务IP',
+ update_by varchar(60) not null comment '更新者',
+ update_time datetime default NULL comment '更新时间',
+ del_flag char(1) default '0' comment '是否删除',
+ result_type char(1) default '0' comment '结果类型(0用户登录,1服务注册)',
+ result_status char(1) default '0' comment '识别状态(0成功,1失败)',
+ failure_reason varchar(100) comment '识别失败原因',
+ primary key (result_id)
+)engine=innodb comment = '人脸识别结果表';
+
+drop table if exists ai_face_databse;
+
+/*==============================================================*/
+/* Table: ai_face_databse */
+/*==============================================================*/
+create table ai_face_databse
+(
+ face_id bigint(20) not null auto_increment comment '主键id',
+ name varchar(10) comment '姓名',
+ sex char(2) default '男' comment '性别',
+ phone varchar(11) default NULL comment '电话号码',
+ idcard_number varchar(20) default null comment '身份证',
+ face_address varchar(100) default null comment '人脸图片路径',
+ create_by varchar(60) default null comment '创建者',
+ create_time datetime default NULL comment '创建时间',
+ update_by varchar(60) not null comment '更新者',
+ update_time datetime default NULL comment '更新时间',
+ del_flag char(1) default '0' comment '是否删除',
+ primary key (face_id)
+)engine=innodb comment = '人脸库表';
+
+
+drop table if exists ai_invoicerecognize_result;
+/*==============================================================*/
+/* Table: ai_invoicerecognize_result */
+/*==============================================================*/
+create table ai_invoicerecognize_result
+(
+ result_id bigint(20) not null auto_increment comment '结果主键id',
+ service_id bigint(20) comment '服务id',
+ rec_encoding varchar(20) comment '机器编码',
+ invoice_code varchar(20) comment '发票代码',
+ invoice_number varchar(20) comment '发票号码',
+ invoice_date varchar(20) comment '发票日期',
+ invoice_check varchar(30) comment '效验码',
+ invoice_model varchar(30) comment '规格新号',
+ invoice_unit char(5) comment '单位',
+ invoice_amount varchar(10) comment '金额',
+ invoice_rate varchar(10) comment '税率',
+ invoice_pay varchar(10) comment '税额',
+ unit_name varchar(60) comment '单位名称',
+ invoice_ident_num varchar(60) comment '纳税人识别号',
+ address_telep varchar(60) comment '地址电话',
+ bank_account varchar(60) comment '开户行及账号',
+ recognize_time datetime comment '识别时间',
+ invoice_total varchar(30) comment '加税合计',
+ response_long long comment '响应时长',
+ invoke_ip varchar(60) comment '调用服务IP',
+ update_by varchar(64) not null comment '更新者',
+ update_time datetime default NULL comment '更新时间',
+ del_flag char(1) default '0' comment '是否删除',
+ result_type char(1) default '0' comment '结果类型(0用户登录,1服务注册)',
+ result_status char(1) default '0' comment '识别状态(0成功,1失败)',
+ failure_reason varchar(100) comment '识别失败原因',
+ primary key (result_id)
+)engine=innodb comment = '发票识别结果表';
+
+
+drop table if exists ai_text_recognize_result;
+
+/*==============================================================*/
+/* Table: ai_text_recognize_result */
+/*==============================================================*/
+create table ai_text_recognize_result
+(
+ result_id bigint(20) not null auto_increment comment '结果主键id',
+ service_id bigint(20) comment '服务id',
+ recognize_result longtext comment '识别结果',
+ recognize_time datetime comment '识别时间',
+ response_long long comment '响应时长',
+ invoke_ip varchar(60) comment '调用服务IP',
+ update_by varchar(64) not null comment '更新者',
+ update_time datetime default NULL comment '更新时间',
+ del_flag char(1) comment '是否删除',
+ result_type char(1) default '0' comment '结果类型(0用户登录,1服务注册)',
+ result_status char(1) default '0' comment '识别状态(0成功,1失败)',
+ failure_reason varchar(100) comment '识别失败原因',
+ primary key (result_id)
+)engine=innodb comment = '文本证识别结果表';
+
+drop table if exists ai_user_service;
+
+/*==============================================================*/
+/* Table: ai_user_service */
+/*==============================================================*/
+create table ai_user_service
+(
+ service_id bigint(20) not null comment '服务id',
+ user_id bigint(20) not null comment '用户id',
+ service_key varchar(64) not null comment '服务key',
+ create_by varchar(60) comment '创建者',
+ create_time datetime default NULL comment '创建时间',
+ update_by varchar(60) not null comment '更新者',
+ update_time datetime default NULL comment '更新时间',
+ del_flag char(1) default '0' comment '是否删除',
+ primary key (service_id, user_id, service_key)
+)engine=innodb comment = '用户和服务注册关系表';
+
+drop table if exists ai_knowledgebase;
+
+/*==============================================================*/
+/* Table: ai_knowledgebase */
+/*==============================================================*/
+create table ai_knowledgebase
+(
+ knowledge_id bigint(20) not null auto_increment comment '知识库id',
+ knowledge_name varchar(60) comment '知识库名称',
+ knowledge_description varchar(100) comment '知识库介绍',
+ knowledge_type char(1) comment '知识库类型(0私有数据库,1公有数据库)',
+ create_by varchar(64) not null comment '创建者',
+ create_time datetime default NULL comment '创建时间',
+ update_by varchar(64) not null comment '更新者',
+ update_time datetime default NULL comment '更新时间',
+ remark varchar(500) character set utf8 default NULL comment '备注',
+ del_flag char(1) comment '是否删除(0代表存在,2代表删除)',
+ primary key(knowledge_id)
+)engine=innodb comment = '知识库表';
+
+
+
+drop table if exists ai_chat_window;
+
+/*==============================================================*/
+/* Table: ai_chat_window */
+/*==============================================================*/
+create table ai_chat_window
+(
+ window_id bigint(20) not null auto_increment comment '窗口id',
+ knowledge_id bigint(20) comment '知识库id',
+ window_name varchar(60) comment '窗口名称',
+ chat_type char(1) comment '聊天类型(0 知识库问答,1 llm问答)',
+ customer_id varchar(64) not null comment '客户',
+ create_time datetime comment '创建时间',
+ update_time datetime default NULL comment '更新时间',
+ del_flag char(1) comment '是否删除(0代表存在,2代表删除)',
+ remark varchar(500) character set utf8 default NULL comment '备注',
+ primary key (window_id)
+)engine=innodb comment = '对话窗口表';
+
+
+drop table if exists ai_question_answer;
+
+/*==============================================================*/
+/* Table: ai_question_answer */
+/*==============================================================*/
+create table ai_question_answer
+(
+ record_id bigint(20) not null auto_increment comment '问答id',
+ window_id bigint(20) comment '窗口id',
+ question longtext comment '问题',
+ answer longtext comment '回答',
+ knowledge longtext comment '知识库溯源文档',
+ del_flag char(1) comment '是否删除(0代表存在,2代表删除)',
+ customer_id varchar(64) not null comment '客户',
+ update_time datetime default NULL comment '更新时间',
+ remark varchar(500) character set utf8 default NULL comment '备注',
+ primary key (record_id)
+)engine=innodb comment = '问答表';
+
+
+drop table if exists ai_knowledge_file;
+
+/*==============================================================*/
+/* Table: ai_knowledge_file */
+/*==============================================================*/
+create table ai_knowledge_file
+(
+ knowledge_file_id bigint(20) not null auto_increment comment '知识库文件id',
+ file_name varchar(60) comment '文件名称',
+ knowledge_id bigint(20) comment '知识库id',
+ file_path varchar(100) comment '文件地址',
+ file_type varchar(64) comment '文件类型',
+ file_size bigint(4) comment '文件大小(单位字节)',
+ del_flag char(1) comment '是否删除(0代表存在,2代表删除)',
+ create_by varchar(64) not null comment '创建者',
+ create_time datetime default NULL comment '创建时间',
+ update_by varchar(64) not null comment '更新者',
+ update_time datetime default NULL comment '更新时间',
+ remark varchar(500) character set utf8 default NULL comment '备注',
+ primary key (knowledge_file_id)
+)engine=innodb comment = '知识库文件表';