# 企业微信智能机器人 API 插件 两个接口均暂不校验 Authorization 或 API Key。 ## 问答小助手 - OpenAPI 配置地址:`/api/assistant/openapi/general.json` - 业务接口:`POST /api/assistant/general/query` - 请求: ```json { "query": "测试表" } ``` - `query` 同时兼容 `content`、`userText`、`message` 和 `input`。 - 处理逻辑保持不变:直接调用原有扣子 `wecom-default` 工作流,不经过 DeepSeek 语义识别。 ## 运动馆智能助手 - OpenAPI 配置地址:`/api/assistant/openapi/sports-venue.json` - 业务接口:`POST /api/assistant/sports-venue/query` - 请求: ```json { "query": "查看本月EC电话合规监控日报" } ``` - `query` 同时兼容 `content`、`userText`、`message` 和 `input`。 - UserID 由后端从企业微信调用上下文请求头自动读取,不需要作为插件业务参数填写。 - 本地联调仍兼容请求体中的 `userId`、`wecomUserId`、`userid` 和 `user_id`。 - 处理逻辑保持不变:DeepSeek 语义识别 → 日期解析 → UserID 数据权限 → 对应日报处理器。 - 同一个 UserID 同时只能执行一条运动馆指令。 ## 返回结构 ```json { "success": true, "code": 0, "content": "机器人直接回复给用户的内容", "attachments": [ { "type": "excel", "name": "日报.xlsx", "downloadUrl": "http://agent.yuedongsports.com/api/assistant/files/文件ID" } ] } ``` 机器人应将 `content` 作为最终回复。Excel 下载链接会同时附加到 `content` 中,文件链接有效期为 30 分钟。