Install
openclaw skills install waimai-merchant外卖商家管理 Skill - 支持商家注册、商品管理、价格修改和配送时间设置。Use when user mentions merchant registration, product management, price updates, delivery time settings for food deliv...
openclaw skills install waimai-merchant外卖商家管理系统,支持商家注册、商品管理、价格修改和配送承诺时间设置。
cd ~/.openclaw/workspace/skills/waimai-merchant
npm install
npm run build
# 注册新商家
node dist/index.js merchant register -n "美味餐厅" -p "13800138000" -a "北京市朝阳区xxx街道"
# 列出所有商家
node dist/index.js merchant list
# 按状态筛选商家
node dist/index.js merchant list --status approved
# 查看商家详情
node dist/index.js merchant show <id>
# 更新商家信息
node dist/index.js merchant update <id> -n "新名称" -p "新电话"
# 认证商家
node dist/index.js merchant approve <id>
# 拒绝商家
node dist/index.js merchant reject <id>
# 暂停商家
node dist/index.js merchant suspend <id>
# 删除商家
node dist/index.js merchant delete <id>
# 搜索商家
node dist/index.js merchant search <keyword>
# 添加新商品
node dist/index.js product add -m <merchant_id> -n "红烧肉" -p 38.00 -c "热菜" -t 30 -s 100
# 列出商品
node dist/index.js product list
# 按商家筛选商品
node dist/index.js product list -m <merchant_id>
# 只显示上架商品
node dist/index.js product list -a
# 按分类筛选
node dist/index.js product list -c "热菜"
# 查看商品详情
node dist/index.js product show <id>
# 更新商品信息
node dist/index.js product update <id> -n "新名称" -d "新描述"
# 修改商品价格
node dist/index.js product price <id> <new_price>
# 修改配送时间
node dist/index.js product delivery <id> <minutes>
# 上架商品
node dist/index.js product activate <id>
# 下架商品
node dist/index.js product deactivate <id>
# 标记售罄
node dist/index.js product soldout <id>
# 删除商品
node dist/index.js product delete <id>
# 搜索商品
node dist/index.js product search <keyword>
# 列出所有分类
node dist/index.js product categories
# 查看数据存储位置
node dist/index.js data
# 显示帮助
node dist/index.js --help
node dist/index.js merchant --help
node dist/index.js product --help
| 字段 | 类型 | 说明 |
|---|---|---|
| id | INTEGER | 主键 |
| name | TEXT | 商家名称 |
| phone | TEXT | 联系电话(唯一) |
| TEXT | 电子邮箱 | |
| address | TEXT | 商家地址 |
| business_license | TEXT | 营业执照号 |
| contact_person | TEXT | 联系人姓名 |
| status | TEXT | 状态:pending/approved/rejected/suspended |
| created_at | DATETIME | 创建时间 |
| updated_at | DATETIME | 更新时间 |
| 字段 | 类型 | 说明 |
|---|---|---|
| id | INTEGER | 主键 |
| merchant_id | INTEGER | 商家ID(外键) |
| name | TEXT | 商品名称 |
| description | TEXT | 商品描述 |
| price | REAL | 当前价格 |
| original_price | REAL | 原价 |
| image_url | TEXT | 商品图片URL |
| category | TEXT | 商品分类 |
| delivery_time | INTEGER | 配送承诺时间(分钟) |
| stock | INTEGER | 库存数量 |
| status | TEXT | 状态:active/inactive/sold_out |
| created_at | DATETIME | 创建时间 |
| updated_at | DATETIME | 更新时间 |
数据存储在: ~/.waimai-merchant/
merchant.db - SQLite 数据库文件merchant register 录入基本信息pendingmerchant approve 通过认证product add 创建商品product price 修改product delivery 修改product activate 将商品上架product soldout 或 product deactivate以下功能为后续迭代方向: