Commit 3090f95e authored by hujun's avatar hujun

经纪人查询

parent 0dce1a45
...@@ -149,7 +149,11 @@ class Broker extends Basic ...@@ -149,7 +149,11 @@ class Broker extends Basic
$fields = 'a.id,a.name,a.img,a.phone'; $fields = 'a.id,a.name,a.img,a.phone';
//客方 //客方
if (!empty($this->userId)) { if (!empty($this->userId)) {
$client = $agents->getAgentUser($fields, [ 'a.id' => $this->userId, 'b.agent_id'=>['neq', $list[0]['id']]]); //客方 if (!empty($list[0]['id'])) {
$client_where['b.agent_id'] = ['neq', $list[0]['id']];
}
$client_where['a.id'] = $this->userId;
$client = $agents->getAgentUser($fields, $client_where); //客方
if (!empty($client)){ if (!empty($client)){
$list[1] = $client; $list[1] = $client;
$list[1]['show_content'] = '帮助客户找更多,善于了解客户需求'; $list[1]['show_content'] = '帮助客户找更多,善于了解客户需求';
...@@ -157,9 +161,17 @@ class Broker extends Basic ...@@ -157,9 +161,17 @@ class Broker extends Basic
} }
//独家方 //独家方
if (!empty($list[0]['id']) && !empty($list[1]['id'])) {
$where['a.id'] = ['not in', [$list[0]['id'], $list[1]['id']]];
} elseif (!empty($list[0]['id'])) {
$where['a.id'] = ['neq', $list[0]['id']];
} elseif (!empty($list[1]['id'])) {
$where['a.id'] = ['neq', $list[1]['id']];
}
$where['b.houses_id'] = $this->params['house_id']; $where['b.houses_id'] = $this->params['house_id'];
$where['b.is_del'] = $where['a.status'] = 0; $where['b.is_del'] = $where['a.status'] = 0;
$where['a.id'] = ['not in', [$list[0]['id'], $list[2]['id']]];
$where['b.type'] = 3; $where['b.type'] = 3;
$house_agent = $agents->getAgentHouseType($fields, $where); $house_agent = $agents->getAgentHouseType($fields, $where);
if (!empty($house_agent)){ if (!empty($house_agent)){
......
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