fix: 三平台内容差异化 + admin敏感词管理表格化
- writer.py: _expand_section() 去除 <100字阈值,始终调用 LLM 平台专属扩写
- prompt_loader.py: 新增 section_expansion_zhihu/wechat/xiaohongshu 三个独立 prompt
- admin.html: 配置管理标签页 + 敏感词/清理规则子标签 + 敏感词表格化管理(编辑/删除)
- config_items.py: PUT /sensitive-words/{id} 支持更新 word/category
- compliance_checker.py: AI 套话从 DB 加载 + 人称规则修正
- initial_data.py: PlatformConfig 字数迁移 + 新种子
- 各前端页面: LLM 配置 rate_limit 字段 + 供应商列表排序
This commit is contained in:
@@ -89,8 +89,14 @@ def update_topic_status(topic_id: str, status: str, compliance_score: Optional[i
|
||||
topic.compliance_score = compliance_score
|
||||
if reviewed_at is not None:
|
||||
topic.reviewed_at = reviewed_at
|
||||
if status in ['ready', 'published']:
|
||||
if status == 'review' and topic.generated_at is None:
|
||||
topic.generated_at = datetime.now()
|
||||
topic.reviewed_at = topic.reviewed_at or datetime.now()
|
||||
if status == 'ready':
|
||||
topic.ready_at = datetime.now().date()
|
||||
topic.reviewed_at = topic.reviewed_at or datetime.now()
|
||||
if status == 'published':
|
||||
topic.published_at = datetime.now().date()
|
||||
db.commit()
|
||||
return True
|
||||
finally:
|
||||
@@ -243,7 +249,6 @@ def save_article(topic_id: str, platform: str, html_content: str, db: Optional[S
|
||||
now = datetime.now()
|
||||
if existing:
|
||||
existing.html_content = html_content
|
||||
existing.compliance_score = existing.compliance_score
|
||||
else:
|
||||
article = Article(
|
||||
id=article_id,
|
||||
|
||||
Reference in New Issue
Block a user