From a5a1fdb8bec55c371e0aa4a97339b92850c11edb Mon Sep 17 00:00:00 2001 From: wong <106998207@qq.com> Date: Fri, 27 Jun 2025 17:22:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extend/WeChatDeviceApi/Adapters/ChuKeBao/Adapter.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Server/extend/WeChatDeviceApi/Adapters/ChuKeBao/Adapter.php b/Server/extend/WeChatDeviceApi/Adapters/ChuKeBao/Adapter.php index 4fe7d07a..b2f0137b 100644 --- a/Server/extend/WeChatDeviceApi/Adapters/ChuKeBao/Adapter.php +++ b/Server/extend/WeChatDeviceApi/Adapters/ChuKeBao/Adapter.php @@ -2,6 +2,7 @@ namespace WeChatDeviceApi\Adapters\ChuKeBao; +use think\facade\Cache; use think\facade\Env; use WeChatDeviceApi\Contracts\WeChatServiceInterface; use WeChatDeviceApi\Exceptions\ApiException; @@ -428,7 +429,8 @@ class Adapter implements WeChatServiceInterface { // 先读取缓存 - $task_info = cache('task_info_' . $id); + + $task_info = Cache::get('task_info_' . $id); if (empty($task_info)) { $task_info = Db::name('customer_acquisition_task') ->where('id', $id) @@ -438,8 +440,8 @@ class Adapter implements WeChatServiceInterface $task_info['reqConf'] = json_decode($task_info['reqConf'], true); $task_info['msgConf'] = json_decode($task_info['msgConf'], true); $task_info['tagConf'] = json_decode($task_info['tagConf'], true); - - cache('task_info_' . $id, $task_info); + Cache::set('task_info_' . $id, $task_info, 600); + } else { return []; }