Files
ylhp-ai-project-manager/src/main/java/cn/yinlihupo/domain/vo/KbDocumentVO.java
JiaoTianBo 8008d367e8 fix(ai-chat): 优化引用文档ID处理支持字符串数组类型
- 将数据库中 referenced_doc_ids 字段从 BIGINT[] 修改为 VARCHAR(255)[]
- 在实体类 AiChatMessage 中将 referencedDocIds 类型改为 String[] 并添加自定义类型处理器
- 新增 PostgresArrayTypeHandler 用于处理 PostgreSQL varchar 数组与 Java String[] 的映射
- 修改查询时 project_id 和 timeline_node_id 的过滤表达式,使用字符串匹配避免类型错误
- AiChatServiceImpl 中保存消息时改用字符串数组保存引用文档ID
- KbDocumentVO 新增 fileUrl 字段映射数据库中对应字段
- 数据库映射文件 AiDocumentMapper.xml 增加 file_url 字段映射
2026-03-30 18:59:52 +08:00

78 lines
1017 B
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package cn.yinlihupo.domain.vo;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 知识库文档VO
*/
@Data
public class KbDocumentVO {
/**
* 文档ID
*/
private String id;
/**
* 文档UUID与id相同
*/
private String docId;
/**
* 文档标题
*/
private String title;
/**
* 文档类型
*/
private String docType;
/**
* 文件类型
*/
private String fileType;
/**
* 文件大小(字节)
*/
private Long fileSize;
/**
* 文件路径
*/
private String filePath;
/**
* 文件URL
*/
private String fileUrl;
/**
* 来源类型
*/
private String sourceType;
/**
* 分块数量
*/
private Integer chunkCount;
/**
* 状态
*/
private String status;
/**
* 创建人
*/
private String createByName;
/**
* 创建时间
*/
private LocalDateTime createTime;
}