Commit 87f518a0 authored by hujun's avatar hujun

录音下载修改

parent 89e173ce
......@@ -62,7 +62,7 @@ class PrivacyNumber
$result_data = PlsDemo::queryRecordFileDownloadUrl($v['call_id'], $v['call_time']);
if ($result_data->Message == 'OK') {
$down_url = explode('?',$result_data->DownloadUrl);
$is_down = down_file($down_url[0], ROOT_PATH.'public'.DS.'static'.DS.'voice',basename($down_url[0]));
$is_down = down_file($result_data->DownloadUrl, ROOT_PATH.'public'.DS.'static'.DS.'voice',basename($down_url[0]));
if (file_exists($is_down)) {
$data['id'] = $v['id'];
......@@ -74,20 +74,20 @@ class PrivacyNumber
}
/*容联云音频下载*/
$rongRecord = new RongBilledInform();
$ids=array();
$field='id,voice_file';
$where='record_down=0';
$down_data2=$rongRecord->getArr($field,$where);
$ids = [];
$field = 'id,mp3_url';
$where = 'download=0';
$down_data2 = $rongRecord->getArr($field,$where);
if($down_data2) {
foreach ($down_data2 as $k => $v) {
$ids[] = $v['id'];
$down_url2 = explode('/', $v['voice_file']);
down_file($v['voice_file'], ROOT_PATH . 'public' . DS . 'static' . DS . 'voice', array_pop($down_url2));
$down_url2 = explode('/', $v['mp3_url']);
down_file($v['mp3_url'], ROOT_PATH . 'public' . DS . 'static' . DS . 'voice', array_pop($down_url2));
}
}
$id_str=implode(',',$ids);
$update['record_down']=1;
$where=" id in($id_str)";
$id_str = implode(',',$ids);
$update['download'] = 1;
$where = " id in($id_str)";
$rongRecord->save($update,$where);
return ;
......
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