chore: add UI audits and reconcile release docs
This commit is contained in:
@@ -25,7 +25,7 @@ order by tenant_id;
|
||||
|
||||
### 2.2 备份与迁移
|
||||
|
||||
先备份数据库,依次执行 `backend/script/sql/update/aihr_20260716_knowledge_space_platform_mysql8.sql` 与 `backend/script/sql/update/aihr_20260722_knowledge_category_mysql8.sql`。迁移可重复执行,但生产仍应先在结构副本验证。执行后至少核对:
|
||||
先备份数据库,依次执行 `backend/script/sql/update/aihr_20260716_knowledge_space_platform_mysql8.sql`、`backend/script/sql/update/aihr_20260722_knowledge_category_mysql8.sql`;需要从原 OSS 文件恢复历史零片段图片/视频时,还必须执行 `backend/script/sql/update/aihr_20260729_media_reprocess_mysql8.sql`。迁移可重复执行,但生产仍应先在结构副本验证。执行后至少核对:
|
||||
|
||||
```sql
|
||||
show tables like 'aihr_knowledge_%';
|
||||
@@ -33,6 +33,7 @@ show create table aihr_knowledge_info;
|
||||
show create table aihr_knowledge_app;
|
||||
show create table aihr_knowledge_space_grant;
|
||||
show create table aihr_knowledge_category;
|
||||
show create table aihr_knowledge_upload_item;
|
||||
```
|
||||
|
||||
## 3. 幂等初始化
|
||||
@@ -123,7 +124,34 @@ left join aihr_knowledge_attach a
|
||||
where a.id is null and o.ext1 in ('aihr-knowledge','aihr-knowledge-staging');
|
||||
```
|
||||
|
||||
### 5.2 细粒度 SOP 迁入 `yc_property_sop`
|
||||
### 5.2 零片段图片/视频排障与重试
|
||||
|
||||
资料处理页把 `aihr_knowledge_attach.status in (0,3)` 且片段数为 0 的图片/视频列为“待重试”。先确认视觉模型、视频 ASR/ffmpeg 和原 OSS 对象仍可读取,再从页面点击“重试”;服务端只接受当前租户、状态为待处理/失败且仍有 OSS 原件的图片或视频,通过 `POST /api/knowledge/doc/processing-tasks/{attachmentId}/retry` 重新暂存并写入异步队列。重复点击由附件状态 CAS 拒绝,不得直接把数据库状态改成完成或手工复制片段。
|
||||
|
||||
只读排障可使用:
|
||||
|
||||
```sql
|
||||
select a.id, a.tenant_id, a.name, a.status, a.remark, a.doc_id,
|
||||
count(f.id) fragment_count
|
||||
from aihr_knowledge_attach a
|
||||
left join aihr_knowledge_fragment f
|
||||
on f.tenant_id = a.tenant_id
|
||||
and f.knowledge_id = a.knowledge_id
|
||||
and f.doc_id = a.doc_id
|
||||
where a.id = <attachmentId>
|
||||
group by a.id, a.tenant_id, a.name, a.status, a.remark, a.doc_id;
|
||||
|
||||
select id, batch_id, file_name, source_attach_id, status, error,
|
||||
fragment_count, update_time
|
||||
from aihr_knowledge_upload_item
|
||||
where tenant_id = '<当前租户>'
|
||||
and source_attach_id = <attachmentId>
|
||||
order by id desc;
|
||||
```
|
||||
|
||||
队列状态固定为 `0=待处理、1=处理中、2=完成、3=失败`。成功条件是最新队列条目为 2、附件为 2、片段数大于 0,并按当前向量配置确认相应片段已向量化;零片段必须保持失败态,不能显示为完成。普通失败条目只有在 72 小时暂存保留期内才可调用 `POST /api/knowledge/doc/upload-items/{id}/retry`;暂存已清理时应重新上传。历史附件重试不依赖旧暂存文件,而是从 OSS 原件重新入队。
|
||||
|
||||
### 5.3 细粒度 SOP 迁入 `yc_property_sop`
|
||||
|
||||
现有“投诉处理 SOP、催缴沟通 SOP、报修跟进 SOP”等 `legacy_*` 空间不直接改名。按以下顺序执行:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user