Commit 422317c2 authored by hujun's avatar hujun

dateFilePath

parent 244a7005
...@@ -1025,4 +1025,23 @@ class PrivacyNumber ...@@ -1025,4 +1025,23 @@ class PrivacyNumber
return Response::create(['code'=>200, 'msg'=>'修改数量'.$result], 'json'); return Response::create(['code'=>200, 'msg'=>'修改数量'.$result], 'json');
} }
public function dateFilePath(){
$model = new AliYunSecretReport();
$date = $_GET['date'];
$where['voice_file'] = ['like', date('Ymd', strtotime('+1 day', strtotime($date))).'/%'];
$where['create_time'] = ['between', [date('Y-m-d', strtotime($date)).' 00:00:00', date('Y-m-d', strtotime($date)).' 23:59:59']];
$data = $model->secretReportAll('id,call_time,voice_file', $where, 500);
foreach($data as $k=>$v) {
$file_arr = explode('/', $v['voice_file']);
$update_data[$k] = [
'id'=>$v['id'],
'voice_file'=> date('Ymd', strtotime($v['call_time'])).'/'.$file_arr[1]
];
}
if ($_GET['update']) {
$model->saveAll($update_data);
}
return Response::create(['code'=>200, 'msg'=>'', 'data'=>$update_data], 'json');
}
} }
\ No newline at end of file
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