代码同步

This commit is contained in:
wong
2026-01-19 14:21:19 +08:00
parent b2abe9f570
commit 28adf38f2f

View File

@@ -91,18 +91,10 @@ class GetWechatMomentsV1Controller extends BaseController
return ResponseHelper::error('暂无可查看的微信账号', 404);
}
// 获取对应的微信账号ID集合
$accountIds = Db::table('s2_wechat_account')
->whereIn('wechatId', $targetWechatIds)
->column('id');
if (empty($accountIds)) {
return ResponseHelper::error('微信账号不存在或尚未同步', 404);
}
// 查询朋友圈:如果传了 userName 参数,则只查看指定用户的;否则查看所有
$query = Db::table('s2_wechat_moments')
->whereIn('wechatAccountId', $accountIds);
->whereIn('userName', $targetWechatIds);
// 如果传了 userName 参数,则只查看指定用户的朋友圈
$userName = $this->request->param('userName/s', '');
@@ -137,6 +129,7 @@ class GetWechatMomentsV1Controller extends BaseController
$limit = (int)$this->request->param('limit', 10);
$paginator = $query->order('createTime', 'desc')
->group('snsId')
->paginate($limit, false, ['page' => $page]);
$list = array_map(function ($item) {