feat: 内容数据迁移至数据库,合规审查全链路打通

- 文章 HTML 存储从文件系统迁移至 articles 表,删除 releases 目录
- 合规审查从 DB 读取 HTML,审查结果写回 DB,通过后自动推进至待发布
- 新增 todayCount 筛选按钮,与系统概览统计数据一致
- 全屏预览修复:提升 z-index 超过侧边栏,添加退出全屏/关闭按钮
- 统一 '优化' → '审查' 命名,消除前后端术语不一致
- 调度器创作完成后自动触发审查(生成 → 审查 → 待发布)
- 清理旧备份/调试文件、过期大纲和研究笔记
This commit is contained in:
Yuzhiran Dev
2026-05-13 17:33:56 +08:00
parent bc6a302e59
commit 233e23016c
234 changed files with 5670 additions and 10651 deletions
+1 -15
View File
@@ -544,21 +544,7 @@ class SustainabilityCollector:
except Exception as e:
logger.error(f"选题数据库保存失败: {e}")
# 3. 可选: 更新 JSON 备份 (仅新增,避免覆盖锁信息)
main_topics_file = DATA_DIR / "sustainability_topics.json"
try:
if main_topics_file.exists():
with open(main_topics_file, 'r', encoding='utf-8') as f:
existing_topics = json.load(f)
else:
existing_topics = []
existing_ids = {t['id'] for t in existing_topics}
new_additions = [asdict(topic) for topic in self.new_topics if topic.id not in existing_ids]
existing_topics.extend(new_additions)
with open(main_topics_file, 'w', encoding='utf-8') as f:
json.dump(existing_topics, f, ensure_ascii=False, indent=2)
except Exception as e:
logger.error(f"JSON备份失败: {e}")
# DB 是唯一数据源,不再写 JSON
def send_wecom_notification(self):
"""发送企业微信通知"""