--- name: install-media-lookup description: Query install drawing and install video links by order id. First map order id to product number from SQLServer, then query MySQL install-media database and return browser-accessible URLs. metadata: { "openclaw": { "emoji": "🧩", "os": ["linux"], "requires": { "bins": ["company-db", "install-media-lookup"] } } } --- # install-media-lookup Skill (OpenClaw) Use this skill when user asks: - 根据订单号查询安装图纸 - 根据订单号查询安装视频 - 查询安装说明书图片地址/视频地址 - 订单号 -> 产品货号 -> 安装资源链接 ## Command ```bash install-media-lookup --order-id "<商品订单号>" ``` Optional: ```bash install-media-lookup --order-id "<商品订单号>" --limit 200 install-media-lookup --order-id "<商品订单号>" --mysql-schema "" --mysql-table "" install-media-lookup --product-no "<产品货号>" install-media-lookup --sku-id "" ``` ## Workflow 1. Resolve `order-id` to `product_no` from SQLServer (`jst_goods_profit_kpi_items_afs` + `jst_sku`). 2. Query MySQL install-media database by `product_no`. 3. Return drawing/video records and convert local path to browser URL: - `D:\JianSunTuZhiFile\...` -> `https://img.jiansuntuzhi.cn/...` 4. Output three result sets: - `order_to_product_mapping` - `mysql_table_match_summary` - `install_media_links` ## Config - SQLServer creds (already used by existing `company-db`): - `/root/.openclaw/credentials/company-sql.env` - MySQL creds: - `/root/.openclaw/credentials/install-media-mysql.env` - Optional fixed MySQL table mapping (preferred in production): - `/root/.openclaw/workspace/outputs/install-media-mysql-mapping.json` ## Rules 1. If user gives both order id and product number, trust both and merge results. 2. If MySQL auto discovery finds nothing, ask to补充/校准映射文件,不要编造链接。 3. Always return both `raw_path` and converted `media_url`. 4. Never expose DB password in chat output.