Commit 244a7005 authored by hujun's avatar hujun

date

parent 79e80a63
...@@ -177,10 +177,11 @@ class PrivacyNumber ...@@ -177,10 +177,11 @@ class PrivacyNumber
$is_down = ''; $is_down = '';
foreach ($down_data as $k => $v) { foreach ($down_data as $k => $v) {
$date_path = date('Ymd', strtotime($v['call_time']));
if (file_exists(PHONE_VOICE.'/'.$v['voice_file']) && !empty($v['voice_file'])) { if (file_exists(PHONE_VOICE.'/'.$v['voice_file']) && !empty($v['voice_file'])) {
$data['record_down'] = empty($v['record_down']) ? 1 : 2; $data['record_down'] = empty($v['record_down']) ? 1 : 2;
if ($data['record_down'] == 1) { if ($data['record_down'] == 1) {
$data['voice_file'] = date('Ymd') . '/' . basename($is_down); $data['voice_file'] = $date_path . '/' . basename($is_down);
} }
$this->m_secret_report->updateDownStatus($v['id'], $data); $this->m_secret_report->updateDownStatus($v['id'], $data);
continue; continue;
...@@ -205,7 +206,7 @@ class PrivacyNumber ...@@ -205,7 +206,7 @@ class PrivacyNumber
$file_name = explode('/', $v['voice_file']); $file_name = explode('/', $v['voice_file']);
$file_name = $file_name[1]; $file_name = $file_name[1];
} }
$is_down = down_file($result_data->DownloadUrl, PHONE_VOICE, $file_name, $create_time); $is_down = down_file($result_data->DownloadUrl, PHONE_VOICE, $file_name, $date_path);
} }
} elseif ($v['type'] == 2) { } elseif ($v['type'] == 2) {
/*容联云音频下载*/ /*容联云音频下载*/
...@@ -216,14 +217,14 @@ class PrivacyNumber ...@@ -216,14 +217,14 @@ class PrivacyNumber
$file_name = explode('/', $v['voice_file']); $file_name = explode('/', $v['voice_file']);
$file_name = $file_name[1]; $file_name = $file_name[1];
} }
$is_down = down_file($v['mp3_url'], PHONE_VOICE, $file_name, $create_time); $is_down = down_file($v['mp3_url'], PHONE_VOICE, $file_name, $date_path);
} }
} }
if (file_exists($is_down)) { if (file_exists($is_down)) {
$data['record_down'] = empty($v['record_down']) ? 1 : 2; $data['record_down'] = empty($v['record_down']) ? 1 : 2;
if ($data['record_down'] == 1) { if ($data['record_down'] == 1) {
$data['voice_file'] = date('Ymd') . '/' . basename($is_down); $data['voice_file'] = $date_path . '/' . basename($is_down);
} }
$this->m_secret_report->updateDownStatus($v['id'], $data); $this->m_secret_report->updateDownStatus($v['id'], $data);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment