Commit 991b569a authored by hujun's avatar hujun

分享商铺咨询经纪人

parent 08e78d56
...@@ -51,12 +51,15 @@ class Broker extends Basic ...@@ -51,12 +51,15 @@ class Broker extends Basic
$agent_client = $agents->getAgentClient($fields, [ 'c.id' => $this->userId, 'a.status'=>0 ]); $agent_client = $agents->getAgentClient($fields, [ 'c.id' => $this->userId, 'a.status'=>0 ]);
} }
//查找30天带看最多的人 //去除分享的商铺
$m_march = new OMarchInModel(); if (empty($this->params['share'])) {
$report_fields = 'COUNT( a.reception_id ) AS num,a.reception_id '; //查找30天带看最多的人
$report_where['b.house_id'] = $params['house_id']; $m_march = new OMarchInModel();
$report_where['a.create_time'] = ['between', [date('Y-m-d', strtotime("-30 day")) . ' 00:00:00', date('Y-m-d').' 23:59:59']]; $report_fields = 'COUNT( a.reception_id ) AS num,a.reception_id ';
$reception_id = $m_march->getMaxMarchInAgent($report_fields, $report_where); $report_where['b.house_id'] = $params['house_id'];
$report_where['a.create_time'] = ['between', [date('Y-m-d', strtotime("-30 day")) . ' 00:00:00', date('Y-m-d').' 23:59:59']];
$reception_id = $m_march->getMaxMarchInAgent($report_fields, $report_where);
}
if (!empty($reception_id['reception_id'])) { if (!empty($reception_id['reception_id'])) {
$report_agent = $agents->getUser(1, 1, '', $fields, [ 'a.id' => $reception_id['reception_id'], 'a.status'=>0,'c.is_del'=>0 ]); $report_agent = $agents->getUser(1, 1, '', $fields, [ 'a.id' => $reception_id['reception_id'], 'a.status'=>0,'c.is_del'=>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