代码提交
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace WeChatDeviceApi\Adapters\ChuKeBao;
|
namespace WeChatDeviceApi\Adapters\ChuKeBao;
|
||||||
|
|
||||||
|
use think\facade\Cache;
|
||||||
use think\facade\Env;
|
use think\facade\Env;
|
||||||
use WeChatDeviceApi\Contracts\WeChatServiceInterface;
|
use WeChatDeviceApi\Contracts\WeChatServiceInterface;
|
||||||
use WeChatDeviceApi\Exceptions\ApiException;
|
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)) {
|
if (empty($task_info)) {
|
||||||
$task_info = Db::name('customer_acquisition_task')
|
$task_info = Db::name('customer_acquisition_task')
|
||||||
->where('id', $id)
|
->where('id', $id)
|
||||||
@@ -438,8 +440,8 @@ class Adapter implements WeChatServiceInterface
|
|||||||
$task_info['reqConf'] = json_decode($task_info['reqConf'], true);
|
$task_info['reqConf'] = json_decode($task_info['reqConf'], true);
|
||||||
$task_info['msgConf'] = json_decode($task_info['msgConf'], true);
|
$task_info['msgConf'] = json_decode($task_info['msgConf'], true);
|
||||||
$task_info['tagConf'] = json_decode($task_info['tagConf'], true);
|
$task_info['tagConf'] = json_decode($task_info['tagConf'], true);
|
||||||
|
Cache::set('task_info_' . $id, $task_info, 600);
|
||||||
cache('task_info_' . $id, $task_info);
|
|
||||||
} else {
|
} else {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user