Commit 4af3fd3f authored by hujun's avatar hujun

1

parent 30fec219
......@@ -119,11 +119,16 @@ class BrokerService
if ($is_new_id) {
$change_old_id = $agent_old[0]['id'];
$id = $this->m_agent->saveAgent($data);
$this->m_agent->saveAgent(['id'=>$agent_old[0]['id'],'status'=>3]);
if (!empty($agent_old[0]['id'])) {
$this->m_agent->saveAgent(['id'=>$agent_old[0]['id'],'status'=>3]);
}
} elseif ($agent_data['status'] == 3) {
$change_old_id = $agent_old[0]['id'];
$id = $this->m_agent->saveAgent(['id'=>$agent_data['id'],'status'=>0]);
$this->m_agent->saveAgent(['id'=>$agent_old[0]['id'],'status'=>3]);
if (!empty($agent_old[0]['id'])) {
$this->m_agent->saveAgent(['id'=>$agent_old[0]['id'],'status'=>3]);
}
} else {
$change_old_id = $agent_old[0]['id'];
//将原来的id作为新的
......
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