Commit 93fa4e17 authored by hujun's avatar hujun

编辑经纪人处理

parent 13aab0ab
...@@ -60,7 +60,7 @@ class BrokerService ...@@ -60,7 +60,7 @@ class BrokerService
$where['phone'] = $data['phone']; $where['phone'] = $data['phone'];
$where['site_id'] = $data['site_id']; $where['site_id'] = $data['site_id'];
$agent_data = $this->m_agent->verifyUser('id,phone,password,site_id', '', $where); $agent_data = $this->m_agent->verifyUser('id,phone,password,site_id,district_id', '', $where);
if (empty($data['id'])) { if (empty($data['id'])) {
if (!empty($agent_data)) { if (!empty($agent_data)) {
...@@ -94,6 +94,12 @@ class BrokerService ...@@ -94,6 +94,12 @@ class BrokerService
return $result; return $result;
} }
$old_site_id = $m_district->getDistrictKeyById('site_id', ['id'=>$agent_data['district_id']]);
$new_site_id = $m_district->getDistrictKeyById('site_id', ['id'=>$data['district_id']]);
if ($old_site_id != $new_site_id) {
return $this->response(101, '编辑部门,导致所属城市不一致');
}
$msg = '编辑成功'; $msg = '编辑成功';
if (!empty($data['password'])) { if (!empty($data['password'])) {
if (($agent_data['password'] == $data['password'])) { if (($agent_data['password'] == $data['password'])) {
......
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