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:
@@ -304,10 +304,17 @@ def batch_update_status(
|
||||
of = org_filter(current_user, Topic)
|
||||
if of is not True:
|
||||
q = q.filter(of)
|
||||
updated = q.update(
|
||||
{Topic.status: status, Topic.updated_at: datetime.now()},
|
||||
synchronize_session=False
|
||||
)
|
||||
now = datetime.now()
|
||||
update_dict = {Topic.status: status, Topic.updated_at: now}
|
||||
if status in ('review', '待审查'):
|
||||
update_dict[Topic.generated_at] = now
|
||||
update_dict[Topic.reviewed_at] = now
|
||||
elif status in ('ready', '待发布'):
|
||||
update_dict[Topic.ready_at] = now.date()
|
||||
update_dict[Topic.reviewed_at] = now
|
||||
elif status in ('published', '已发布'):
|
||||
update_dict[Topic.published_at] = now.date()
|
||||
updated = q.update(update_dict, synchronize_session=False)
|
||||
db.commit()
|
||||
return {"ok": True, "updated": updated}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user