Commit 0a29fe78 authored by hujun's avatar hujun

释放号码修改

parent d2c64206
......@@ -56,7 +56,10 @@ class PrivacyNumber
*/
public function queryRecordFile() {
$down_data = Db::table('aliyun_secret_report')->field('id,call_id,call_time')
->where('record_down' ,0)->whereTime('call_time','<',time()-900)->select();
->where('record_down' ,0)
->where('time' ,'<>',0)
->whereTime('call_time','<',time()-900)
->select();
foreach ($down_data as $k => $v) {
$result_data = PlsDemo::queryRecordFileDownloadUrl($v['call_id'], $v['call_time']);
......@@ -73,7 +76,7 @@ class PrivacyNumber
}
}
/*容联云音频下载*/
$rongRecord = new RongBilledInform();
/* $rongRecord = new RongBilledInform();
$ids = [];
$field = 'id,mp3_url';
$where = 'download=0';
......@@ -88,7 +91,7 @@ class PrivacyNumber
$id_str = implode(',',$ids);
$update['download'] = 1;
$where = " id in($id_str)";
$rongRecord->save($update,$where);
$rongRecord->save($update,$where);*/
return ;
}
......@@ -106,6 +109,7 @@ class PrivacyNumber
->join('aliyun_phone b','a.aliYun_phone_id=b.id','left')
->field('a.id,aliYun_phone_id,expiry_date,phone_x,phone_a,phone_b,subsId')
->where('a.status',1)
->where('b.type',1)
->select();
$time = strtotime(date('Y-m-d')); //今天0点
......@@ -118,6 +122,11 @@ class PrivacyNumber
//解除绑定
if ($date <= $time) {
$subsId = $bind->getSubsId($v['phone_x'], $v['phone_a'], $v['phone_b'], 1);
if (empty($subsId)) {
continue;
}
$result = PlsDemo::unbindSubscription($subsId, $v['phone_x']);
if ($result->Message == 'OK') {
$bind->UnBind($v['phone_x'], $v['phone_a'], $v['phone_b'], $result->RequestId);
......
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