Files
sino-mci/channel-service
marsal 51a373e06c chore: consolidate docker-compose and add integration tests
- Merge infrastructure/docker-compose.yml + docker-compose.app.yml into root docker-compose.yml with profiles (infra/app).
- Add healthchecks for mysql/redis/rabbitmq/mci-server/channel-service and depends_on conditions.
- Rewrite scripts/local-up.sh to use profiles and wait for healthy states.
- Add curl to mci-server and channel-service Docker images for healthchecks.
- Add npm test script to admin-web (type-check + build smoke test).
- Add scripts/test-external-api.sh covering 11 API endpoints.
- Verify Java (7/7), Python (6/6), npm build, external API (11/11), and UI flows.
2026-07-07 13:35:41 +08:00
..

sino-mci-channel-service

Python 渠道服务,用于管理 pywechat 个人微信等渠道客户端。

当前状态

  • 使用 Mock pywechat 客户端进行开发联调;真实 Windows 环境需接入 pywechat/pywinauto 驱动微信 PC 客户端。
  • 提供登录二维码模拟、消息发送模拟、心跳上报、客户端监控页面。

本地运行

cd channel-service
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload

测试

pytest

接口

  • GET /health 健康检查
  • POST /v1/wechat-personal/login/start 开始登录
  • GET /v1/wechat-personal/login/{account_id}/status 查询登录状态
  • POST /v1/wechat-personal/login/{account_id}/confirm 模拟扫码确认
  • POST /v1/wechat-personal/send/text 发送文本消息
  • POST /v1/heartbeat 客户端心跳
  • GET /v1/monitor/status 查询所有客户端状态
  • GET /monitor 客户端监控页面