Commit 30fec219 authored by hujun's avatar hujun

1

parent 5f149f69
...@@ -79,7 +79,7 @@ class BrokerService ...@@ -79,7 +79,7 @@ class BrokerService
if ($agent_num > 0) { if ($agent_num > 0) {
//根据是否带看过判断是否换id //根据是否带看过判断是否换id
$m_march_in = new OMarchInModel(); $m_march_in = new OMarchInModel();
$march_data = $m_march_in->selectMarchInOne('a.id', ['a.reception_id'=>$agent_old['id'],'b.site_id'=>$data['site_id']]); $march_data = $m_march_in->selectMarchInOne('a.id', ['reception_id'=>$agent_old['id'],'site_id'=>$data['site_id']]);
if ($march_data['id']) { if ($march_data['id']) {
$is_new_id = 0; $is_new_id = 0;
} }
...@@ -119,6 +119,7 @@ class BrokerService ...@@ -119,6 +119,7 @@ class BrokerService
if ($is_new_id) { if ($is_new_id) {
$change_old_id = $agent_old[0]['id']; $change_old_id = $agent_old[0]['id'];
$id = $this->m_agent->saveAgent($data); $id = $this->m_agent->saveAgent($data);
$this->m_agent->saveAgent(['id'=>$agent_old[0]['id'],'status'=>3]);
} elseif ($agent_data['status'] == 3) { } elseif ($agent_data['status'] == 3) {
$change_old_id = $agent_old[0]['id']; $change_old_id = $agent_old[0]['id'];
$id = $this->m_agent->saveAgent(['id'=>$agent_data['id'],'status'=>0]); $id = $this->m_agent->saveAgent(['id'=>$agent_data['id'],'status'=>0]);
......
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