workflows/schedules/commands/notification-routing 与 source-manifests 四模块 清单同步登录统一化与新工作流(product.hk_anpei_public_inventory.daily 等); docs 运维手册、控制台与耗时分布文档、CI 关键脚本清单、AGENTS 指南更新; 测试与模块注册对齐。
15 KiB
工作流总览(未隐藏)
生成日期:2026-10-08。数据来源:
config/workflows.json、config/schedules.json、控制台显示名(var/state/console/workflow-display-names.json);数据库表提取自各入口脚本及共享 DB 辅助模块的内联 SQL。 范围:控制台中未被隐藏的工作流共 30 个(全部 39 个中剔除浏览器端隐藏的 10 个,其中content.relogin.weekly已不在当前配置中)。 定时时间均为 Asia/Shanghai,由常驻调度器gyxx schedule run按config/schedules.json触发;标注「未启用」的仅支持控制台手动运行。 启动脚本为仓库根目录相对路径,由工作流引擎相对src/gyxx_flow/modules/<模块>/解析执行;×N表示同一脚本被 N 个步骤以不同参数复用。关联数据库表说明:均指云端 PostgreSQL(
GYXX_POSTGRES_DSN),(写)= INSERT/UPDATE/DELETE,(读)= SELECT,(建)= CREATE TABLE IF NOT EXISTS。三点公共约定:
- 内容营销用到款式映射的脚本会经
feishu_mapping→adapters/workflow_config.py间接读动态配置表workflow_dynamic_styles、workflow_dynamic_style_platforms(并合并读cmt_styles,首跑建workflow_dynamic_*表),下表不逐一列出。- 店铺情报各入库脚本启动时执行
shop_intelligence/db/schema.sql、商品电商多数入库脚本执行product_commerce/db/schema.sql,幂等建该模块全量表(21 / 26 张);下表只列该工作流实际读写的表。- 读写
information_schema/pg_catalog系统目录的通用校验不列出。
内容营销(content_marketing,4 个)
| 工作流名称 | ID | 功能 | 定时执行 | 启动脚本 | 关联数据库表 |
|---|---|---|---|---|---|
| 合作达人内容指标日报采集 | content.metrics.daily |
按日采集合作达人在 B站、小红书蒲公英、星图(未命中用抖店达人广场补采)的曝光互动指标并同步 PostgreSQL;05:00 档补采 01:00 未完成任务 | 每日 01:00、05:00 | src/gyxx_flow/modules/content_marketing/run_all.pysrc/gyxx_flow/modules/content_marketing/data/tools/sync_metrics_to_cmt_notes.py |
cmt_note_metric_snapshots(写)cmt_notes_master(读写)cmt_creators(读写)cmt_styles(读) |
| 自营内容指标日报采集 | content.metrics.self_operated.daily |
刷新自营款式映射,采集自营 B站、蝉妈妈、小红书 ARK 指标;飞书曝光回填并将三平台全量内容指标按日快照入库 | 每日 06:00 | …/content_marketing/data/tools/refresh_self_mapping.py…/content_marketing/self_bilibili_scraper.py…/content_marketing/chanmama_scraper.py…/content_marketing/self_xhs_scraper.py…/content_marketing/data/tools/sync_metrics_to_cmt_notes.py…/content_marketing/data/tools/sync_self_video_metrics.py |
cmt_self_video_metrics(写)cmt_note_metric_snapshots(写)cmt_notes_master(读写)cmt_creators(读写)cmt_styles(读) |
| 笔记清单与合作同步 | content.notes_master.daily |
一次飞书拉取同时落笔记身份与合作字段;笔记数量按去重链接口径维护主表 | 每日 09:00 | src/gyxx_flow/modules/content_marketing/data/tools/sync_notes_master.py |
cmt_notes_master(建+写)cmt_note_metric_snapshots(建)cmt_styles(读写)cmt_creators(读写) |
| 多平台评论周采集 | content.comments.weekly |
B站、小红书、抖音三平台评论并行采集,任一平台失败则工作流失败 | 每周日 12:00 | …/content_marketing/data/tools/batch_rescrape_bilibili.py…/content_marketing/data/tools/batch_rescrape_xiaohongshu.py…/content_marketing/data/tools/batch_rescrape_douyin.py |
cmt_comments(写)cmt_notes_master(读写) |
店铺情报(shop_intelligence,12 个)
| 工作流名称 | ID | 功能 | 定时执行 | 启动脚本 | 关联数据库表 |
|---|---|---|---|---|---|
| 店铺经营指标周采集 | shop.metrics.weekly |
三平台作为独立节点并行采集店铺经营指标并写 PostgreSQL(不写飞书 Base) | 每周一 12:00 | src/gyxx_flow/modules/shop_intelligence/runners/run_shop.py ×3 |
jd_shop_weekly、dy_shop_weekly、tm_shop_weekly(各平台步骤分别写) |
| 竞店指标周采集 | shop.competitor.weekly |
京东、抖音并行采集竞店指标并入库,单平台失败不阻断另一平台 | 每周一 12:30 | src/gyxx_flow/modules/shop_intelligence/runners/run_peer_store.py ×2 |
jd_peer_store_ranking、dy_peer_store_ranking(各平台步骤分别写) |
| 京东自营业绩日采集 | shop.jd_self_operated.daily |
采集京东自营品牌与商品业绩(业务日期 = 运行日 −2) | 每日 09:00 | …/shop_intelligence/collectors/jd_self_operated_brand_daily.py…/shop_intelligence/collectors/jd_self_operated_product_daily.py |
jd_self_operated_brand_daily(写)jd_self_operated_product_daily(写) |
| 京东客服消息采集 | shop.jd_customer_service.daily |
按业务日在商智消息视图采集顾客会话,单日须完成全部顾客,失败保留进度可重试 | 每月 21 日 03:00 | src/gyxx_flow/modules/shop_intelligence/collectors/jd_customer_service_messages.py |
jd_customer_service_conversations、jd_customer_service_messages(写) |
| 抖音客服消息采集 | shop.douyin_customer_service.daily |
按业务日采集抖音客服会话,失败保留进度可安全重试 | 每月 21 日 03:20 | src/gyxx_flow/modules/shop_intelligence/collectors/dy_customer_service_messages.py |
dy_customer_service_conversations、dy_customer_service_messages、dy_customer_service_conversation_orders(写)dy_customer_service_products(读写) |
| 京东差评采集 | shop.jd_negative_reviews.daily |
按店铺选择日期范围逐日采集京东负面评价,按评价 ID 幂等 | 每月 22 日 03:00 | src/gyxx_flow/modules/shop_intelligence/collectors/jd_negative_reviews.py |
jd_negative_reviews(写) |
| 抖音差评采集 | shop.dy_negative_reviews.daily |
逐日采集抖音负面评价(评价历史仅保留近 30 天),按订单 ID 幂等 | 每月 22 日 03:20 | src/gyxx_flow/modules/shop_intelligence/collectors/dy_negative_reviews.py |
dy_negative_reviews(写) |
| 京东品退问题采集 | shop.jd_after_sales_issues.daily |
在商智 31 天限制下按连续区间采集售后服务单,按申请日期写业务日,幂等更新 | 每月 23 日 03:00 | src/gyxx_flow/modules/shop_intelligence/collectors/jd_after_sales_issues.py |
jd_after_sales_issues(写,含范围外残留 DELETE 清理) |
| 抖音品退采集 | shop.douyin_after_sales_quality.daily |
采集抖音售后单,按申请时间归属业务日,账号 + 售后编号幂等更新 | 每月 23 日 03:20 | src/gyxx_flow/modules/shop_intelligence/collectors/dy_after_sales_quality.py |
dy_after_sales_quality_orders、dy_after_sales_quality_negotiations(写) |
| 天猫客服消息采集 | shop.tmall_customer_service.daily |
按每次最多 31 天的窗口顺序采集天猫客服聊天记录,失败窗口保留数据 | 每月 24 日 03:40(未启用,仅手动) | src/gyxx_flow/modules/shop_intelligence/collectors/tmall_customer_service_messages.py |
tmall_customer_service_conversations、tmall_customer_service_messages(写) |
| 天猫差评采集 | shop.tmall_negative_reviews.daily |
固定筛选负面评价并按评价时间范围采集后入库 | 每月 25 日 03:50(未启用,仅手动) | src/gyxx_flow/modules/shop_intelligence/collectors/tmall_negative_reviews.py |
tmall_negative_reviews(写) |
| 抖音待改价申诉 | shop.douyin_price_appeal |
每个时点重新扫描可申诉并发起价格申诉;已申诉商品不重复出现 | 每日每小时整点(00:00–23:00) | src/gyxx_flow/modules/shop_intelligence/collectors/dy_store_competitor_store_scraping.py |
无(浏览器采集 + 本地 JSON) |
商品电商(product_commerce,12 个)
| 工作流名称 | ID | 功能 | 定时执行 | 启动脚本 | 关联数据库表 |
|---|---|---|---|---|---|
| 商品人群画像周采集 | product.persona.daily |
天猫、抖音、京东人群画像并行采集并写入对应飞书多维表 | 每周二 12:00 | src/gyxx_flow/modules/product_commerce/run_daily_persona.py |
daily_persona_metrics(写) |
| 商品经营日报采集 | product.daily |
按业务日期(运行日 −1)采集 ERP 与三平台数据,幂等写 PostgreSQL,汇总分析后导出并写飞书日报 | 每日 08:40 | src/gyxx_flow/modules/product_commerce/orchestrate_daily_collection.py |
写:product_reviews、product_daily_metrics、daily_style_metrics、fact_style_analysis_reports、decline_events、fact_alert_history读: weekly_style_metrics、daily_persona_metrics、main_image_creatives、cmt_styles、cmt_notes_master、cmt_comments、cmt_creators(及上述写表) |
| 私域库存预警 | product.online_stock_alert.daily |
查询线上渠道全部商品,库存低于 3 时汇总 SKU 与库存发飞书预警 | 每日 09:30 | src/gyxx_flow/modules/product_commerce/online_stock_alert.py |
无(企业数据交互 HTTP API + 飞书) |
| 三平台电商费用采集 | product.ecommerce_costs.daily |
并行采集天猫万相台、京东、抖音千川业务日前一天的费用,各平台先下载再导入,单平台失败不阻断其他 | 每日 10:00 | …/product_commerce/collect_tmall_wanxiang_ads.py…/product_commerce/import_tmall_product_ads.py…/product_commerce/collect_jd_ad_costs.py…/product_commerce/import_jd_ad_costs.py…/product_commerce/collect_douyin_qianchuan_ads.py…/product_commerce/import_douyin_qianchuan_ads.py |
product_daily_metrics(写,天猫原始费用并入 raw_data JSONB)jd_product_ad_daily_metrics、dy_product_ad_daily_metrics(建+写)dim_style(读) |
| 京东与天猫主图周采集 | product.main_image.weekly |
京东与天猫万相台主图并行采集,各自完成 PG 入库和飞书插入,互不影响 | 每周日 08:30 | …/product_commerce/run_weekly_jd_main_image.py…/product_commerce/run_weekly_main_image.py |
main_image_creatives(写) |
| 飞书商品月度销量表填写 | product.sales_sheet.daily |
抓取并校验全部 ERP 报表后填写飞书月度销量表,同名月份页幂等覆盖,无 ERP 编码产品按 0 写入 | 每月 1 日 10:00 | src/gyxx_flow/modules/product_commerce/sync_monthly_sales_sheet.py |
无(聚水潭浏览器采集 + 飞书写入) |
| 聚水潭全店铺款式日报 | product.erp_all_shop_daily |
聚水潭商品主题分析全选全部店铺,采集业务日前一天所有 ERP 款式的自定义销量与退货量并幂等写 PostgreSQL | 每日 09:00 | src/gyxx_flow/modules/product_commerce/backfill_erp_all_shop_daily.py |
erp_all_shop_style_daily_metrics(读写) |
| 客服香港库存工作流 | product.hk_anpei_public_inventory.daily |
校验计划书 SKU 与库存表商品编码对应关系,调聚水潭库存接口查询并将公有可用数写入仓库现有库存列 | 每日 09:00 | src/gyxx_flow/modules/product_commerce/public_sku_inventory_sheet.py |
无(聚水潭 API + 飞书表格) |
| 天猫视频上传 | product.video_upload |
按店铺规则扫描飞书视频附件,凭附件级发布账本防重,仅在存在可领取附件时登录光合账号上传 | 每 3 天 14:00 | src/gyxx_flow/modules/product_commerce/upload_video_to_guanghe.py |
fact_video_publications、fact_video_publication_attempts(建+读写,附件级发布账本)dim_style、product_daily_metrics(读) |
| 京东视频上传 | product.jd_video_upload |
从凌云air基线扫描到视图末尾识别新增视频,以 record_id + file_token 幂等发布到京东 | 每 3 天 14:00 | src/gyxx_flow/modules/product_commerce/upload_video_to_jd.py |
fact_video_publications、fact_video_publication_attempts(建+读写,发布账本)dim_style、product_daily_metrics(读) |
| 天猫百亿补贴批量报名 | product.tmall_baibu_apply |
每次从飞书下载报名模板逐入口提交;默认仅导入 3 个不带超链入口(含老天猫全渠道 3C 后置完善草稿),可切换全部 6 个入口 | 每日每小时整点(00:00–23:00) | …/product_commerce/tmall_baibu_apply_old_chain_bag.py…/product_commerce/tmall_baibu_apply_old_all_bag.py…/product_commerce/tmall_baibu_apply_old_all_3c.py…/product_commerce/tmall_baibu_apply_old_chain_3c.py…/product_commerce/tmall_baibu_apply_new_chain_bag.py…/product_commerce/tmall_baibu_apply_new_all_bag.py |
无(浏览器操作 + 飞书) |
| 三平台市场排行采集(用于行军图) | product.market_rank |
并行采集天猫、京东、抖音市场排行,按月份写入品牌行军图数据库并复用已有人工分类 | 每月 1 日 10:00 | src/gyxx_flow/modules/product_commerce/orchestrate_market_rank_collection.py |
market_product、market_product_classification(读写)fact_market_product_snapshot(写,重跑先 DELETE)fact_market_rank_reports、fact_market_rank_notifications(建+读写)dim_market_style、dim_market_scene(读) |
供应链(supply_chain,2 个)
| 工作流名称 | ID | 功能 | 定时执行 | 启动脚本 | 关联数据库表 |
|---|---|---|---|---|---|
| 补货预警日处理 | supply.replenishment_alert.daily |
依据配置 SKU 与库存阈值生成预警并写 PostgreSQL,仅存在预警时发送业务通知 | 每日 07:00 | src/gyxx_flow/modules/supply_chain/run.py |
fact_threshold_alert(读写)dim_product(写)workflow_runs(读写,运行账本)bitable_insert_log(读写,通知去重账本) |
| 同步聚水潭到货时间 | supply.replenishment_arrival_sync.daily |
读取到货同步待处理队列,按商品编码在聚水潭采购单页面更新预计到货时间并回写状态,失败行下次自动重试 | 每日 09:00 | src/gyxx_flow/modules/supply_chain/orchestrator/scripts/collect_replenishment_arrival_sync.py |
erp_replenishment_arrival_sync(读写,队列表由 ERP 应用写入) |
附:已隐藏的工作流(未收录)
浏览器端隐藏的 10 个 ID:content.creator_report.monthly、content.marketing_report.daily、content.metrics.backfill、content.relogin.weekly(配置中已不存在)、content.summary.monthly、content.summary.weekly、product.alert.daily、product.style_analysis.interval、supply.purchase_confirmation.daily、supply.replenishment.weekly。