Commit 6982583d authored by zhuwei's avatar zhuwei

1

parent 0f7536d6
...@@ -930,6 +930,11 @@ class Broker extends Basic ...@@ -930,6 +930,11 @@ class Broker extends Basic
if ($data['status'] == 'fail') { if ($data['status'] == 'fail') {
return $this->response("101", $data['msg']); return $this->response("101", $data['msg']);
} }
//根据id查经纪人手机号
$m_agent = new AAgents();
$agnet_phone = $m_agent->getPhoneById($params['agents_id'], 'phone');
//把手机号相同的账号状态全改
$m_agent->updateStatus($agnet_phone);
//先判断是否已经存在数据 //先判断是否已经存在数据
$field = 'id,status'; $field = 'id,status';
......
...@@ -1557,4 +1557,18 @@ class AAgents extends BaseModel ...@@ -1557,4 +1557,18 @@ class AAgents extends BaseModel
->select(); ->select();
} }
public function getPhoneById($id, $fields)
{
$return = $this->where('id', $id)->value($fields);
return $return;
}
public function updateStatus($phone,$params=['status'=>4])
{
$result = $this->where('phone', $phone)->update($params);
//dump($this->getLastSql());
// big_log($this->getLastSql());
return $result;
}
} }
\ No newline at end of file
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