新版流量池提交
This commit is contained in:
@@ -68,10 +68,22 @@ class CallRecordingController extends BaseController
|
||||
$result = requestCurl($this->baseUrl . 'api/CallRecording/list', $params, 'GET', $header);
|
||||
$response = handleApiResponse($result);
|
||||
|
||||
// 确保 response 是数组格式
|
||||
if (!is_array($response)) {
|
||||
$response = [];
|
||||
}
|
||||
|
||||
// 确保 results 字段存在且是数组
|
||||
if (!isset($response['results']) || !is_array($response['results'])) {
|
||||
$response['results'] = [];
|
||||
}
|
||||
|
||||
// 保存数据到数据库
|
||||
if (!empty($response['results'])) {
|
||||
foreach ($response['results'] as $item) {
|
||||
$this->saveCallRecording($item);
|
||||
if (is_array($item)) {
|
||||
$this->saveCallRecording($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user