Commit bfee909a authored by hujun's avatar hujun

1

parent 26f07315
......@@ -319,11 +319,7 @@ class Broker extends Basic
$data['msg'] = '';
if (isset($this->params['phone'])) {
$redis = new VerifyRepetitionService();
$is = $redis->verifyStart(2, $this->params['phone'], 0);
if ($is) {
$is = 0;
$m_agents = new AAgents();
if (empty($this->params['phone'])) {
$agents_data = $m_agents->getAgentInfo('id,update_time,call_number', $this->params['agent_id']);
......@@ -331,11 +327,16 @@ class Broker extends Basic
$agents_data = $m_agents->getAgentInfo('id,update_time,call_number', '', ['phone'=>$this->params['phone']]);
}
if (!empty($agents_data)) {
$redis = new VerifyRepetitionService();
$is = $redis->verifyStart(2, $agents_data['id'], 0);
}
if ($is) {
$insert_data['update_time'] = $agents_data['update_time'];
$insert_data['call_number'] = $agents_data['call_number'] + 1;
$data['data'] = $m_agents->editData($insert_data, $agents_data['id']);
}
} else {
$data['status'] = 101;
$data['msg'] = 'phone is null';
......
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