Commit 3eaa9f86 authored by hujun's avatar hujun

咨询经纪人修改

parent c3052632
......@@ -55,7 +55,7 @@ class Broker extends Basic
$m_report = new OReportModel();
$report_fields = 'COUNT( a.report_agent_id ) AS num,a.report_agent_id ';
$report_where['b.house_id'] = $params['house_id'];
$report_where['a.create_time'] = ['between', [date('Y-m-d', strtotime("-30 day")), date('Y-m-d')]];
$report_where['a.create_time'] = ['between', [date('Y-m-d', strtotime("-30 day")) . ' 00:00:00', date('Y-m-d').' 23:59:59']];
$report_agent_id = $m_report->getMaxReportAgent($report_fields, $report_where);
if (!empty($report_agent_id['report_agent_id'])) {
......@@ -67,12 +67,17 @@ class Broker extends Basic
$where['a.status'] = 0;
$list = $agents->getUser($pageNo, $pageSize, 'evaluate desc', $fields, $where);
if (!empty($agent_client['id'])) {
$agent_id = [];
foreach ($list as $v) {
$agent_id[] = $v['id'];//下面去重
}
if (!empty($agent_client['id']) && !in_array($agent_client['id'], $agent_id)) {
$agent_client['show_content'] = '帮助客户找更多,善于了解客户需求';
array_unshift($list, $agent_client);
}
if (!empty($report_agent[0]['id'])) {
if (!empty($report_agent[0]['id']) && !in_array($report_agent[0]['id'], $agent_id)) {
$report_agent[0]['show_content'] = '我对本铺非常了解,最近带看本铺多次';
array_unshift($list, $report_agent[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