feat: 落地聊天记录异步持久化基础设施

- 新增 chatlog 模块、AnalyticalDB 公共层与 common-mq Redis Streams 实现

- 建立 Redis 热态、MySQL 热数据、AnalyticalDB 历史查询与同步链路

- 收紧聊天记录幂等、摘要时序与持久化失败语义
This commit is contained in:
2026-04-05 11:35:05 +08:00
parent 1ecc28e498
commit 25e80433a5
105 changed files with 8050 additions and 2 deletions

29
pom.xml
View File

@@ -26,6 +26,8 @@
<okhttp.version>4.9.3</okhttp.version>
<spring-boot.version>3.5.9</spring-boot.version>
<flyway.version>10.20.1</flyway.version>
<flyway.clickhouse.version>10.20.0</flyway.clickhouse.version>
<clickhouse.version>0.7.1</clickhouse.version>
<slf4j.version>2.0.17</slf4j.version>
<HikariCP.version>4.0.3</HikariCP.version>
<fastjson.version>2.0.57</fastjson.version>
@@ -142,6 +144,13 @@
<version>8.3.0</version>
</dependency>
<dependency>
<groupId>com.clickhouse</groupId>
<artifactId>clickhouse-jdbc</artifactId>
<version>${clickhouse.version}</version>
<classifier>all</classifier>
</dependency>
<dependency>
<groupId>com.mybatis-flex</groupId>
<artifactId>mybatis-flex-codegen</artifactId>
@@ -255,6 +264,11 @@
<artifactId>flyway-mysql</artifactId>
<version>${flyway.version}</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-database-clickhouse</artifactId>
<version>${flyway.clickhouse.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
@@ -304,6 +318,11 @@
<artifactId>easyflow-common-ai</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>tech.easyflow</groupId>
<artifactId>easyflow-common-analytical-db</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>tech.easyflow</groupId>
<artifactId>easyflow-common-all</artifactId>
@@ -354,6 +373,11 @@
<artifactId>easyflow-common-chat-protocol</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>tech.easyflow</groupId>
<artifactId>easyflow-common-mq</artifactId>
<version>${revision}</version>
</dependency>
<!-- modules -->
<dependency>
@@ -376,6 +400,11 @@
<artifactId>easyflow-module-log</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>tech.easyflow</groupId>
<artifactId>easyflow-module-chatlog</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>tech.easyflow</groupId>
<artifactId>easyflow-module-system</artifactId>