feat(ai): 添加AI模型管理和分段上传功能
- 创建AI模型版本管理表tz_ai_model并添加相关索引 - 添加AiModelController、AiModelService等完整的模型管理接口 - 实现模型创建、更新、删除、分页查询等功能 - 添加模型状态更新功能支持启用禁用等状态变更 - 在S3FileClient中实现分段上传uploadMultipart方法 - 扩展FileApi接口增加createFileMultipart分段上传接口 - 修改Nacos配置将命名空间从dev改为具体ID值 - 在SecurityConfiguration中开放AI模型管理接口权限
This commit is contained in:
@@ -59,4 +59,10 @@ public interface FileApi {
|
||||
*/
|
||||
@PostMapping(PREFIX + "/create")
|
||||
CommonResult<String> createFile(@Valid @RequestBody FileCreateReqDTO createReqDTO);
|
||||
|
||||
/**
|
||||
* 分段上传文件
|
||||
*/
|
||||
@PostMapping(PREFIX + "/create-multipart")
|
||||
CommonResult<String> createFileMultipart(@Valid @RequestBody FileCreateReqDTO createReqDTO);
|
||||
}
|
||||
|
||||
@@ -2,9 +2,11 @@ package com.tashow.cloud.fileapi.api.file.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/** RPC 服务 - 文件创建 Request DTO */
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class FileCreateReqDTO {
|
||||
|
||||
/** 原文件名称 */
|
||||
@@ -13,9 +15,10 @@ public class FileCreateReqDTO {
|
||||
/** 文件路径 */
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 文件内容
|
||||
*/
|
||||
/** 文件访问地址 */
|
||||
private String url;
|
||||
|
||||
/** 文件内容 */
|
||||
@NotEmpty(message = "文件内容不能为空")
|
||||
private byte[] content;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user