新增结构初始化

This commit is contained in:
2025-11-01 21:29:17 +08:00
parent 6ef1117d95
commit c5f5945cb9
13 changed files with 117 additions and 343 deletions

View File

@@ -267,7 +267,7 @@
<!-- AI 聊天--> <!-- AI 聊天-->
<dependency> <dependency>
<groupId>com.vetti</groupId> <groupId>com.vetti</groupId>
<artifactId>vetti-ai</artifactId> <artifactId>vetti-hotakes</artifactId>
<version>${vetti.version}</version> <version>${vetti.version}</version>
</dependency> </dependency>
@@ -329,8 +329,7 @@
<module>vetti-quartz</module> <module>vetti-quartz</module>
<module>vetti-generator</module> <module>vetti-generator</module>
<module>vetti-common</module> <module>vetti-common</module>
<module>vetti-ai</module> <module>vetti-hotakes</module>
<module>vetti-hotake</module>
</modules> </modules>
<packaging>pom</packaging> <packaging>pom</packaging>

View File

@@ -78,18 +78,13 @@
<!-- AI 业务逻辑处理--> <!-- AI 业务逻辑处理-->
<dependency> <dependency>
<groupId>com.vetti</groupId> <groupId>com.vetti</groupId>
<artifactId>vetti-ai</artifactId> <artifactId>vetti-hotakes</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId> <artifactId>spring-boot-starter-websocket</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.vetti</groupId>
<artifactId>vetti-hotake</artifactId>
<version>3.9.0</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>

View File

@@ -1,112 +1,112 @@
package com.vetti.web.controller.hotake; //package com.vetti.web.controller.hotake;
//
//
import com.vetti.common.annotation.Log; //import com.vetti.common.annotation.Log;
import com.vetti.common.core.controller.BaseController; //import com.vetti.common.core.controller.BaseController;
import com.vetti.common.core.domain.AjaxResult; //import com.vetti.common.core.domain.AjaxResult;
import com.vetti.common.core.page.TableDataInfo; //import com.vetti.common.core.page.TableDataInfo;
import com.vetti.common.enums.BusinessType; //import com.vetti.common.enums.BusinessType;
import com.vetti.common.utils.poi.ExcelUtil; //import com.vetti.common.utils.poi.ExcelUtil;
import com.vetti.hotake.domain.HotakeSysFile; //import com.vetti.hotake.domain.HotakeSysFile;
import com.vetti.hotake.domain.dto.HotakeSysFileDto; //import com.vetti.hotake.domain.dto.HotakeSysFileDto;
import com.vetti.hotake.service.IHotakeSysFileService; //import com.vetti.hotake.service.IHotakeSysFileService;
import io.swagger.annotations.Api; //import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; //import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; //import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; //import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; //import org.springframework.web.multipart.MultipartFile;
//
import java.util.List; //import java.util.List;
//
/** ///**
* 文件管理Controller // * 文件管理Controller
* // *
* @author ID // * @author ID
* @date 2025-09-06 // * @date 2025-09-06
*/ // */
@Api(tags = "文件管理") //@Api(tags = "文件管理")
@RestController //@RestController
@RequestMapping("/hotake/sysFile") //@RequestMapping("/hotake/sysFile")
public class HotakeSysFileController extends BaseController { //public class HotakeSysFileController extends BaseController {
//
@Autowired // @Autowired
private IHotakeSysFileService hotakeSysFileService; // private IHotakeSysFileService hotakeSysFileService;
//
/** // /**
* 查询文件管理列表 // * 查询文件管理列表
*/ // */
@ApiOperation("查询文件管理列表") // @ApiOperation("查询文件管理列表")
@PreAuthorize("@ss.hasPermi('command:sysFile:list')") // @PreAuthorize("@ss.hasPermi('command:sysFile:list')")
@GetMapping("/list") // @GetMapping("/list")
public TableDataInfo list(HotakeSysFile HotakeSysFile) { // public TableDataInfo list(HotakeSysFile HotakeSysFile) {
startPage(); // startPage();
List<HotakeSysFileDto> list = hotakeSysFileService.selectHotakeSysFileList(HotakeSysFile); // List<HotakeSysFileDto> list = hotakeSysFileService.selectHotakeSysFileList(HotakeSysFile);
return getDataTable(list); // return getDataTable(list);
} // }
//
/** // /**
* 导出文件管理列表 // * 导出文件管理列表
*/ // */
@ApiOperation("导出文件管理列表") // @ApiOperation("导出文件管理列表")
@PreAuthorize("@ss.hasPermi('command:sysFile:export')") // @PreAuthorize("@ss.hasPermi('command:sysFile:export')")
@Log(title = "文件管理", businessType = BusinessType.EXPORT) // @Log(title = "文件管理", businessType = BusinessType.EXPORT)
@GetMapping("/export") // @GetMapping("/export")
public AjaxResult export(HotakeSysFile HotakeSysFile) { // public AjaxResult export(HotakeSysFile HotakeSysFile) {
List<HotakeSysFileDto> list = hotakeSysFileService.selectHotakeSysFileList(HotakeSysFile); // List<HotakeSysFileDto> list = hotakeSysFileService.selectHotakeSysFileList(HotakeSysFile);
ExcelUtil<HotakeSysFileDto> util = new ExcelUtil<HotakeSysFileDto>(HotakeSysFileDto.class); // ExcelUtil<HotakeSysFileDto> util = new ExcelUtil<HotakeSysFileDto>(HotakeSysFileDto.class);
return util.exportExcel(list, "文件管理数据"); // return util.exportExcel(list, "文件管理数据");
} // }
//
/** // /**
* 获取文件管理详细信息 // * 获取文件管理详细信息
*/ // */
@ApiOperation("获取文件管理详细信息") // @ApiOperation("获取文件管理详细信息")
@PreAuthorize("@ss.hasPermi('command:sysFile:query')") // @PreAuthorize("@ss.hasPermi('command:sysFile:query')")
@GetMapping(value = "/{id}") // @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) { // public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(hotakeSysFileService.selectHotakeSysFileById(id)); // return AjaxResult.success(hotakeSysFileService.selectHotakeSysFileById(id));
} // }
//
/** // /**
* 新增文件管理 // * 新增文件管理
*/ // */
@ApiOperation("新增文件管理") // @ApiOperation("新增文件管理")
@PreAuthorize("@ss.hasPermi('command:sysFile:add')") // @PreAuthorize("@ss.hasPermi('command:sysFile:add')")
@Log(title = "文件管理", businessType = BusinessType.INSERT) // @Log(title = "文件管理", businessType = BusinessType.INSERT)
@PostMapping // @PostMapping
public AjaxResult add(@RequestPart("file") MultipartFile file, HotakeSysFile HotakeSysFile) { // public AjaxResult add(@RequestPart("file") MultipartFile file, HotakeSysFile HotakeSysFile) {
hotakeSysFileService.insertHotakeSysFile(file, HotakeSysFile); // hotakeSysFileService.insertHotakeSysFile(file, HotakeSysFile);
return toAjax(1); // return toAjax(1);
} // }
//
/** // /**
* 修改文件管理 // * 修改文件管理
*/ // */
@ApiOperation("修改文件管理") // @ApiOperation("修改文件管理")
@PreAuthorize("@ss.hasPermi('command:sysFile:edit')") // @PreAuthorize("@ss.hasPermi('command:sysFile:edit')")
@Log(title = "文件管理", businessType = BusinessType.UPDATE) // @Log(title = "文件管理", businessType = BusinessType.UPDATE)
@PutMapping // @PutMapping
public AjaxResult edit(@RequestPart(name = "file", required = false) MultipartFile file, HotakeSysFile HotakeSysFile) { // public AjaxResult edit(@RequestPart(name = "file", required = false) MultipartFile file, HotakeSysFile HotakeSysFile) {
return toAjax(hotakeSysFileService.updateHotakeSysFile(file, HotakeSysFile)); // return toAjax(hotakeSysFileService.updateHotakeSysFile(file, HotakeSysFile));
} // }
//
/** // /**
* 删除文件管理 // * 删除文件管理
*/ // */
@ApiOperation("删除文件管理") // @ApiOperation("删除文件管理")
@PreAuthorize("@ss.hasPermi('command:sysFile:remove')") // @PreAuthorize("@ss.hasPermi('command:sysFile:remove')")
@Log(title = "文件管理", businessType = BusinessType.DELETE) // @Log(title = "文件管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") // @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) { // public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(hotakeSysFileService.deleteHotakeSysFileByIds(ids)); // return toAjax(hotakeSysFileService.deleteHotakeSysFileByIds(ids));
} // }
//
@ApiOperation("禁用文件管理") // @ApiOperation("禁用文件管理")
@PreAuthorize("@ss.hasPermi('command:sysFile:edit')") // @PreAuthorize("@ss.hasPermi('command:sysFile:edit')")
@Log(title = "文件管理", businessType = BusinessType.UPDATE) // @Log(title = "文件管理", businessType = BusinessType.UPDATE)
@PutMapping("/available/{id}") // @PutMapping("/available/{id}")
public AjaxResult availableSysFile(@PathVariable Long id) { // public AjaxResult availableSysFile(@PathVariable Long id) {
return toAjax(hotakeSysFileService.availableSysFile(id)); // return toAjax(hotakeSysFileService.availableSysFile(id));
} // }
} //}

View File

@@ -1,13 +0,0 @@
package com.vetti.ai.service;
/**
* 面试聊天共通 服务层
*/
public interface ChatCommonService {
/**
* 处理面试聊天语音结果数据
*/
public void handleChatVoiceData();
}

View File

@@ -1,38 +0,0 @@
package com.vetti.ai.service.impl;
import com.vetti.ai.service.ChatCommonService;
import com.vetti.common.ai.elevenLabs.ElevenLabsClient;
import com.vetti.common.ai.gpt.ChatGPTClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 聊天面试共通 服务层实现
*/
@Service
public class ChatCommonServiceImpl implements ChatCommonService {
@Autowired
private ElevenLabsClient elevenLabsClient;
@Autowired
private ChatGPTClient chatGPTClient;
@Override
public void handleChatVoiceData() {
//1、获取面试传输的语音文件
//2、语音文件转换成文本字符串
//3、把文本传输到GPT中,等待回复
//4、GPT返回的结果,文本转成语音文件
//5、返回最终的语音文件
}
}

View File

@@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.vetti</groupId>
<artifactId>vetti-service</artifactId>
<version>3.9.0</version>
</parent>
<artifactId>vetti-hotake</artifactId>
<dependencies>
<!-- 防止进入swagger页面报类型转换错误排除3.0.0中的引用手动增加1.6.2版本 -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<!-- 通用工具-->
<dependency>
<groupId>com.vetti</groupId>
<artifactId>vetti-common</artifactId>
</dependency>
<dependency>
<groupId>com.vetti</groupId>
<artifactId>vetti-system</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -1,131 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vetti.hotake.mapper.HotakeSysFileMapper">
<resultMap type="HotakeSysFile" id="HotakeSysFileResult">
<result property="id" column="id" />
<result property="minioBucketName" column="minio_bucket_name" />
<result property="code" column="code" />
<result property="fileName" column="file_name" />
<result property="fileType" column="file_type" />
<result property="fileSize" column="file_size" />
<result property="storagePath" column="storage_path" />
<result property="fileMd5" column="file_md5" />
<result property="uploadPlatform" column="upload_platform" />
<result property="available" column="available" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectHotakeSysFileVo">
select id, minio_bucket_name, code, file_name, file_type, file_size, storage_path, file_md5, upload_platform, available, create_by, create_time, update_by, update_time, remark from hotake_sys_file
</sql>
<select id="selectHotakeSysFileList" parameterType="HotakeSysFile" resultMap="HotakeSysFileResult">
<include refid="selectHotakeSysFileVo"/>
<where>
<if test="minioBucketName != null and minioBucketName != ''"> and minio_bucket_name = #{minioBucketName}</if>
<if test="code != null and code != ''"> and code = #{code}</if>
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
<if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if>
<if test="fileSize != null "> and file_size = #{fileSize}</if>
<if test="storagePath != null and storagePath != ''"> and storage_path = #{storagePath}</if>
<if test="fileMd5 != null and fileMd5 != ''"> and file_md5 = #{fileMd5}</if>
<if test="uploadPlatform != null "> and upload_platform = #{uploadPlatform}</if>
<if test="available != null "> and available = #{available}</if>
</where>
</select>
<select id="selectHotakeSysFileById" parameterType="Long" resultMap="HotakeSysFileResult">
<include refid="selectHotakeSysFileVo"/>
where id = #{id}
</select>
<insert id="insertHotakeSysFile" parameterType="HotakeSysFile" useGeneratedKeys="true" keyProperty="id">
insert into Hotake_sys_file
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="minioBucketName != null and minioBucketName != ''">minio_bucket_name,</if>
<if test="code != null and code != ''">code,</if>
<if test="fileName != null and fileName != ''">file_name,</if>
<if test="fileType != null and fileType != ''">file_type,</if>
<if test="fileSize != null">file_size,</if>
<if test="storagePath != null and storagePath != ''">storage_path,</if>
<if test="fileMd5 != null">file_md5,</if>
<if test="uploadPlatform != null">upload_platform,</if>
<if test="available != null">available,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="minioBucketName != null and minioBucketName != ''">#{minioBucketName},</if>
<if test="code != null and code != ''">#{code},</if>
<if test="fileName != null and fileName != ''">#{fileName},</if>
<if test="fileType != null and fileType != ''">#{fileType},</if>
<if test="fileSize != null">#{fileSize},</if>
<if test="storagePath != null and storagePath != ''">#{storagePath},</if>
<if test="fileMd5 != null">#{fileMd5},</if>
<if test="uploadPlatform != null">#{uploadPlatform},</if>
<if test="available != null">#{available},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateHotakeSysFile" parameterType="HotakeSysFile">
update Hotake_sys_file
<trim prefix="SET" suffixOverrides=",">
<if test="minioBucketName != null and minioBucketName != ''">minio_bucket_name = #{minioBucketName},</if>
<if test="code != null and code != ''">code = #{code},</if>
<if test="fileName != null and fileName != ''">file_name = #{fileName},</if>
<if test="fileType != null and fileType != ''">file_type = #{fileType},</if>
<if test="fileSize != null">file_size = #{fileSize},</if>
<if test="storagePath != null and storagePath != ''">storage_path = #{storagePath},</if>
<if test="fileMd5 != null">file_md5 = #{fileMd5},</if>
<if test="uploadPlatform != null">upload_platform = #{uploadPlatform},</if>
<if test="available != null">available = #{available},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteHotakeSysFileById" parameterType="Long">
delete from Hotake_sys_file where id = #{id}
</delete>
<delete id="deleteHotakeSysFileByIds" parameterType="String">
delete from Hotake_sys_file where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<insert id="batchInsertHotakeSysFile">
insert into Hotake_sys_file( id, minio_bucket_name, code, file_name, file_type, file_size, storage_path, file_md5, upload_platform, available, create_by, create_time, update_by, update_time, remark,) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.minioBucketName}, #{item.code}, #{item.fileName}, #{item.fileType}, #{item.fileSize}, #{item.storagePath}, #{item.fileMd5}, #{item.uploadPlatform}, #{item.available}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark},)
</foreach>
</insert>
<select id="selectHotakeSysFileByIds" parameterType="String" resultMap="HotakeSysFileResult">
<include refid="selectHotakeSysFileVo"/> where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</select>
</mapper>

View File

@@ -11,7 +11,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>vetti-ai</artifactId> <artifactId>vetti-hotakes</artifactId>
<dependencies> <dependencies>