|
|
@ -276,13 +276,15 @@ class PhoneController extends \yii\web\Controller |
|
|
|
$called_area=$request->post('called_area'); |
|
|
|
$called_area=$request->post('called_area'); |
|
|
|
$extend=$request->post('extend'); |
|
|
|
$extend=$request->post('extend'); |
|
|
|
|
|
|
|
|
|
|
|
$item = NetworkPhoneAssignT::findOne(['phone'=>$caller]); |
|
|
|
$item = NetworkPhoneAssignT::find() |
|
|
|
|
|
|
|
->where('phone=:phone1 or phone=:phone2',[':phone1'=>$caller,':phone2'=>$called]) |
|
|
|
|
|
|
|
->one(); |
|
|
|
if(!$item) { |
|
|
|
if(!$item) { |
|
|
|
return json_encode(['code' => 400,'message' => "失败"]);; |
|
|
|
return json_encode(['code' => 400,'message' => "失败"]);; |
|
|
|
} |
|
|
|
} |
|
|
|
// file_put_contents('/tmp/'.time().rand(100,999).'.log', print_r($request->post(), true)); |
|
|
|
// file_put_contents('/tmp/'.time().rand(100,999).'.log', print_r($request->post(), true)); |
|
|
|
//$b = new GiftCreateImageErrorT(); |
|
|
|
//$b = new GiftCreateImageErrorT(); |
|
|
|
$network_phone = NetworkPhoneT::findOne(['recorder_id'=>$recorder_id,'caller'=>$caller,'called'=>$called,'caller_show'=>$caller_show]); |
|
|
|
$network_phone = NetworkPhoneT::findOne(['recorder_id'=>$recorder_id]); |
|
|
|
if(!$network_phone){ |
|
|
|
if(!$network_phone){ |
|
|
|
|
|
|
|
|
|
|
|
$network_phone = new NetworkPhoneT(); |
|
|
|
$network_phone = new NetworkPhoneT(); |
|
|
|