Commit 5ac11aef authored by hujun's avatar hujun

错误码

parent ccddeb8b
......@@ -344,7 +344,7 @@ class CallPhoneService
if ($data['status'] != 'success') {
//绑定失败返回错误信息
$data['status'] = 'failed';
$data['msg'] = '拨号失败,15秒再试,再无法拨号请联系请联系运营人员!';
$data['msg'] = $result['code_msg'];
}
}
......
......@@ -8,6 +8,7 @@
namespace app\api_broker\untils;
use app\api_broker\service\PushMessageService;
use app\chat\utils\CurlUtil;
class RongDemo
......@@ -155,6 +156,7 @@ class RongDemo
'userData' => $aNumber .'-'.$bNumber //记录a和b号码,回调使用
];
$result = json_decode($this->sendCurl($url, $post_data, $Authorization), true);
$result['code_msg'] = $this->getCodeString($result['statusCode']);
return $result;
}
......@@ -178,4 +180,47 @@ class RongDemo
$result = json_decode($this->sendCurl($url, $post_data, $Authorization), true);
return $result;
}
/**
* 容联云code对于说明
*
* @param $code
* @return string
*/
public function getCodeString($code) {
$msg = '';
switch ($code) {
case '000000' :
$msg = '成功';break;
case '300001' :
$msg = '参数错误';break;
case '300002' :
$msg = '验证错误';break;
case '301101' :
$msg = '无号码资源';break;
case '301201' :
$msg = '云内部存储异常';break;
case '301401' :
$msg = '无空闲号码';break;
case '301402' :
$msg = '分配失败';break;
case '301403' :
$msg = '数据库错误';break;
case '301501' :
$msg = '类型号码未配置';break;
case '301633' :
$msg = '找不到应用';break;
case '320201' :
$msg = '号码已解绑';break;
case '320400' :
$msg = '参数异常';break;
case '320402' :
$msg = '号码已使用';break;
case '320500' :
$msg = '落地异常';break;
case '309000' :
$msg = '其它错误';break;
}
return $msg;
}
}
\ 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