Commit c4335164 authored by hujun's avatar hujun

time

parent 21d417a4
...@@ -800,7 +800,7 @@ class PrivacyNumber ...@@ -800,7 +800,7 @@ class PrivacyNumber
$where['is_down'] = 1; $where['is_down'] = 1;
} }
$where['is_del'] = 0; $where['is_del'] = 0;
$where['call_time'] = ['<', date('Y-m-d H:i:s', time() - 900)]; $where['call_time'] = ['between', [date('Y-m-d H:i:s', strtotime("-15 day")), date('Y-m-d H:i:s', time() - 900)]];
$field = 'id,call_id,call_time,voice_file,type,mp3_url,is_down'; $field = 'id,call_id,call_time,voice_file,type,mp3_url,is_down';
$list = $this->m_down->getList(1, 3000, '', $field, $where); $list = $this->m_down->getList(1, 3000, '', $field, $where);
return Response::create(['code'=>200, 'msg'=>'', 'data'=>$list], 'json'); return Response::create(['code'=>200, 'msg'=>'', 'data'=>$list], 'json');
...@@ -959,6 +959,12 @@ class PrivacyNumber ...@@ -959,6 +959,12 @@ class PrivacyNumber
$update_data = []; $update_data = [];
foreach ($data['data'] as $k => $v) { foreach ($data['data'] as $k => $v) {
if (file_exists(PHONE_VOICE.'/'.$v['voice_file']) && !empty($v['voice_file'])) { if (file_exists(PHONE_VOICE.'/'.$v['voice_file']) && !empty($v['voice_file'])) {
$update_data[] = [
'id'=>$v['id'],
'voice_file'=>$save_path,
'call_time' => $v['call_time'],
'call_id' => $v['call_id']
];
continue; continue;
} }
......
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