feat(media): 微信消息媒体 OSS 归档与下载地址回写

- 新增 MediaArchiveJob、MediaOssArchiveService、WechatMediaArchiveService 与回填命令
- Message/DataProcessing 等支持归档调度与持久化下载 URL
- WebSocket 控制器整理;朋友圈与文档/定时任务说明更新

Made-with: Cursor
This commit is contained in:
wong
2026-04-14 09:37:00 +08:00
parent ae1120f1e3
commit 1deebf3f5c
19 changed files with 1046 additions and 151 deletions

View File

@@ -37,6 +37,8 @@ class DataProcessing extends BaseController
'CmdChatroomOperate', //修改群信息 {chatroomName群名、announce公告、extra公告、wechatAccountId、wechatChatroomId}
'CmdNewMessage', //接收消息
'CmdSendMessageResult', //更新消息状态
'CmdDownloadVideoResult', //视频下载结果回写
'CmdDownloadFileResult', //文件下载结果回写
'CmdPinToTop', //置顶
];
@@ -168,6 +170,34 @@ class DataProcessing extends BaseController
$msg = '更新消息状态成功';
break;
case 'CmdDownloadVideoResult':
case 'CmdDownloadFileResult':
$friendMessageId = $this->request->param('friendMessageId', 0);
$chatroomMessageId = $this->request->param('chatroomMessageId', 0);
$url = trim((string)$this->request->param('url', ''));
if (empty($friendMessageId) && empty($chatroomMessageId)) {
return ResponseHelper::error('friendMessageId或chatroomMessageId至少提供一个');
}
if (empty($url)) {
return ResponseHelper::error('url不能为空');
}
$messageController = new MessageController();
$updated = $messageController->updateDownloadedMessageMedia([
'friendMessageId' => $friendMessageId,
'chatroomMessageId' => $chatroomMessageId,
'url' => $url,
'type' => $type,
]);
if (!$updated) {
return ResponseHelper::error('媒体地址回写失败');
}
$msg = '媒体地址回写成功';
break;
case 'CmdPinToTop': //置顶
$wechatFriendId = $this->request->param('wechatFriendId', 0);
$wechatChatroomId = $this->request->param('wechatChatroomId', 0);