first commit
This commit is contained in:
commit
2c0812be7b
|
|
@ -0,0 +1,16 @@
|
|||
*.log
|
||||
*.log.*
|
||||
*.bak
|
||||
logs
|
||||
**/target
|
||||
.idea/
|
||||
*.class
|
||||
*.manifest
|
||||
*.spec
|
||||
.DS_Store
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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.
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
<p align="center">
|
||||
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-b99b286755aef70355a7084753f89cdb7c9.png">
|
||||
</p>
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">bonus v3.6.4</h1>
|
||||
<h4 align="center">基于 Vue/Element UI 和 Spring Boot/Spring Cloud & Alibaba 前后端分离的分布式微服务架构</h4>
|
||||
|
||||
|
||||
## 平台简介
|
||||
|
||||
博诺思人工智能平台是基于博诺思微服务平台的轻量级系统,基于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 // 公共依赖
|
||||
~~~
|
||||
|
||||
## 人工智能平台架构图
|
||||
|
||||
<img src="bonus-ai-architecture.jpg"/>
|
||||
|
||||
## 软件版本要求
|
||||
~~~
|
||||
|
||||
软件名称 版本要求 推荐版本
|
||||
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
|
||||
~~~
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
|
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-modules</artifactId>
|
||||
<version>24.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>bonus-modules-ai</artifactId>
|
||||
|
||||
<description>
|
||||
bonus-modules-ai服务
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Sentinel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot Actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<!-- Mysql Connector -->
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- bonus Common DataSource -->
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-common-datasource</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- bonus Common DataScope -->
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-common-datascope</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-common-swagger</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- bonus Common Log -->
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- bonus Common Swagger -->
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-common-swagger</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>30.0-jre</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-common-security</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
||||
|
|
@ -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" +
|
||||
" ''-' `'-' `-..-' ");
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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("文件上传成功");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -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<BasicFile> 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<BasicFile> getFiles() {
|
||||
return files;
|
||||
}
|
||||
|
||||
public void setFiles(List<BasicFile> files) {
|
||||
this.files = files;
|
||||
}
|
||||
|
||||
public String getAnnotationStatus() {
|
||||
return annotationStatus;
|
||||
}
|
||||
|
||||
public void setAnnotationStatus(String annotationStatus) {
|
||||
this.annotationStatus = annotationStatus;
|
||||
}
|
||||
}
|
||||
|
|
@ -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<Long> annotators;
|
||||
|
||||
/**审核人员列表*/
|
||||
private List<Long> 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<SubTask> subAnnotationTasks;
|
||||
|
||||
public List<Long> getReviewers() {
|
||||
return reviewers;
|
||||
}
|
||||
|
||||
public void setReviewers(List<Long> reviewers) {
|
||||
this.reviewers = reviewers;
|
||||
}
|
||||
|
||||
public List<Long> getAnnotators() {
|
||||
return annotators;
|
||||
}
|
||||
|
||||
public void setAnnotators(List<Long> annotators) {
|
||||
this.annotators = annotators;
|
||||
}
|
||||
|
||||
public List<SubTask> getSubAnnotationTasks() {
|
||||
return subAnnotationTasks;
|
||||
}
|
||||
|
||||
public void setSubAnnotationTasks(List<SubTask> 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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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 <String> labels;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 父节点名称 */
|
||||
private String parentName;
|
||||
|
||||
/** 子部门 */
|
||||
private List<BasicFile> children = new ArrayList<BasicFile>();
|
||||
|
||||
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<BasicFile> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<BasicFile> children) {
|
||||
this.children = children;
|
||||
}
|
||||
}
|
||||
|
|
@ -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<Label> children = new ArrayList<Label>();
|
||||
|
||||
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<Label> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<Label> children) {
|
||||
this.children = children;
|
||||
}
|
||||
}
|
||||
|
|
@ -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<AnnotationResult> 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<AnnotationResult> getFileAnnotationResultList() {
|
||||
return fileAnnotationResultList;
|
||||
}
|
||||
|
||||
public void setFileAnnotationResultList(List<AnnotationResult> fileAnnotationResultList) {
|
||||
this.fileAnnotationResultList = fileAnnotationResultList;
|
||||
}
|
||||
|
||||
public static class AnnotationResult{
|
||||
/**文件id*/
|
||||
private Long fileId;
|
||||
/**标注结果*/
|
||||
private String annotationResult;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;}
|
||||
}
|
||||
|
|
@ -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;}
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
Spring Boot Version: ${spring-boot.version}
|
||||
Spring Application Name: ${spring.application.name}
|
||||
_ __ _ _
|
||||
(_) / _|(_)| |
|
||||
_ __ _ _ ___ _ _ _ ______ | |_ _ | | ___
|
||||
| '__|| | | | / _ \ | | | || ||______|| _|| || | / _ \
|
||||
| | | |_| || (_) || |_| || | | | | || || __/
|
||||
|_| \__,_| \___/ \__, ||_| |_| |_||_| \___|
|
||||
__/ |
|
||||
|___/
|
||||
|
|
@ -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}
|
||||
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/bonus-ai" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.bonus" level="debug" />
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn" />
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info" />
|
||||
<appender-ref ref="file_error" />
|
||||
</root>
|
||||
</configuration>
|
||||
|
|
@ -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}
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -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."
|
||||
|
||||
|
|
@ -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}
|
||||
|
|
@ -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
|
||||
|
|
@ -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}
|
||||
|
|
@ -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}
|
||||
|
|
@ -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
|
||||
|
|
@ -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}
|
||||
|
|
@ -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 = '知识库文件表';
|
||||
Loading…
Reference in New Issue