From 2d4a1ee6ce50ccb71fa74e627e12299df3eb04a7 Mon Sep 17 00:00:00 2001 From: wong <106998207@qq.com> Date: Mon, 7 Jul 2025 16:06:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extend/WeChatDeviceApi/Adapters/ChuKeBao/Adapter.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Server/extend/WeChatDeviceApi/Adapters/ChuKeBao/Adapter.php b/Server/extend/WeChatDeviceApi/Adapters/ChuKeBao/Adapter.php index b0f38ef4..2a8914f8 100644 --- a/Server/extend/WeChatDeviceApi/Adapters/ChuKeBao/Adapter.php +++ b/Server/extend/WeChatDeviceApi/Adapters/ChuKeBao/Adapter.php @@ -247,8 +247,10 @@ class Adapter implements WeChatServiceInterface { $tasks = Db::name('task_customer') - ->whereIn('status', [1,2,3]) + ->whereIn('status', [1,2]) + ->where('updated_at', '>=', (time() - 86400 * 3)) ->limit(50) + ->order('updated_at DESC') ->select(); if (empty($tasks)) { @@ -284,15 +286,14 @@ class Adapter implements WeChatServiceInterface - if ($passedWeChatId && !empty($task_info['msgConf'])) { + Db::name('task_customer') ->where('id', $task['id']) ->update(['status' => 4, 'updated_at' => time()]); $wechatFriendRecord = $this->getWeChatAccoutIdAndFriendIdByWeChatIdAndFriendPhone($passedWeChatId, $task['phone']); $msgConf = is_string($task_info['msgConf']) ? json_decode($task_info['msgConf'], 1) : $task_info['msgConf']; - $wechatFriendRecord && $this->sendMsgToFriend($wechatFriendRecord['id'], $wechatFriendRecord['wechatAccountId'], $msgConf); } else {