From 3d5a4946105f329600383eb6913159c5fa8b487f Mon Sep 17 00:00:00 2001 From: wong <106998207@qq.com> Date: Wed, 2 Jul 2025 15:48:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E7=82=B9=E8=B5=9E=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Server/application/job/WorkbenchAutoLikeJob.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Server/application/job/WorkbenchAutoLikeJob.php b/Server/application/job/WorkbenchAutoLikeJob.php index 94849ecc..351b6b6b 100644 --- a/Server/application/job/WorkbenchAutoLikeJob.php +++ b/Server/application/job/WorkbenchAutoLikeJob.php @@ -224,11 +224,11 @@ class WorkbenchAutoLikeJob $webSocket = new WebSocketController(['userName' => $username, 'password' => $password, 'accountId' => $toAccountId]); // 查询未点赞的朋友圈 - $moments = $this->getUnlikedMoments($friend['friendId']); + $moments = $this->getUnlikedMoments($friend['wechatId']); if (empty($moments) || count($moments) == 0) { //采集最新朋友圈 $webSocket->getMoments(['wechatFriendId' => $friend['friendId'], 'wechatAccountId' => $friend['wechatAccountId']]); - $moments = $this->getUnlikedMoments($friend['friendId']); + $moments = $this->getUnlikedMoments($friend['wechatId']); } @@ -269,16 +269,16 @@ class WorkbenchAutoLikeJob /** * 获取未点赞的朋友圈 - * @param int $friendId + * @param int $wechatId * @return \think\Collection */ - protected function getUnlikedMoments($friendId) + protected function getUnlikedMoments($wechatId) { return Db::table('s2_wechat_moments') ->alias('wm') ->join('workbench_auto_like_item wali', 'wali.momentsId = wm.id', 'left') ->where([ - ['wm.wechatFriendId', '=', $friendId], + ['wm.userName', '=', $wechatId], ['wali.id', 'null', null] ]) ->where('wm.update_time', '>=', time() - 86400)