Commit de0e66cb authored by hujun's avatar hujun

1

parent 1c396d89
......@@ -389,7 +389,7 @@ class CallPhoneService
$where['a.status'] = 1;
$where['a.phone_a'] = $this->phone_a;
$where['a.type'] = $this->is_privacy;
$agent_call = $this->m_bind->getPhoneX('a.phone_a,a.phone_b,b.phone_x', $where);
$agent_call = $this->m_bind->getPhoneX('a.phone_a,a.phone_b,b.phone_x', $where, 'a.id ASC');
$result_unbind = $this->agentsUnBindRedis($agent_call['phone_a'], $agent_call['phone_b'], $agent_call['phone_x']);
$data['msg'] = '号码使用完,请联系运营人员。';
if ($result_unbind['status'] == 'successful') {
......@@ -459,7 +459,7 @@ class CallPhoneService
$where['a.status'] = 1;
$where['a.phone_a'] = $this->phone_a;
$where['a.type'] = $this->is_privacy;
$agent_call = $this->m_bind->getPhoneX('a.phone_a,a.phone_b,b.phone_x', $where);
$agent_call = $this->m_bind->getPhoneX('a.phone_a,a.phone_b,b.phone_x', $where, 'a.id ASC');
$result_unbind = $this->agentsUnBindRedis($agent_call['phone_a'], $agent_call['phone_b'], $agent_call['phone_x']);
if ($result_unbind['status'] == 'successful') {
$result = $yun_tong_xun->setNumber($this->phone_a, $this->phone_b, $area, $this->expiry_date, $record);
......
......@@ -92,18 +92,19 @@ class BindingPhone extends BaseModel
*
* @param string $field
* @param array $where
* @param string $order
* @return array|false|\PDOStatement|string|\think\Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getPhoneX($field = '', $where = [])
public function getPhoneX($field = '', $where = [], $order = 'a.id desc')
{
return $this->alias('a')
->field($field)
->join('aliYun_phone b', 'a.aliYun_phone_id=b.id', 'left')
->where($where)
->order('a.id desc')
->order($order)
->find();
}
......
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