Commit 9b2e9395 authored by clone's avatar clone

11

parent b029e719
...@@ -51,14 +51,15 @@ class HomePageLog extends Basic ...@@ -51,14 +51,15 @@ class HomePageLog extends Basic
public function userFollowUpList() public function userFollowUpList()
{ {
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"start_time" => strtotime('2019-01-01 15:47:36'), //开始时间 "start_time" => strtotime('2019-04-01 15:47:36'), //开始时间
"end_time" => strtotime('2019-01-30 15:47:36'), //结束时间 "end_time" => strtotime('2019-04-07 15:47:36'), //结束时间
//"name_or_phone" => "18112347151",//用户姓名或电话 经纪人 "name_or_phone" => "黄莉",//用户姓名或电话 经纪人
//"search_content" => "酸菜",// 搜索跟进内容 "search_content" => "奶茶",// 搜索跟进内容
"pageNo" => 1, "pageNo" => 1,
"pageSize" => 15 "pageSize" => 15
);*/ );
$this->siteId = 10001;*/
$vrs = new VerifyRepetitionService(); $vrs = new VerifyRepetitionService();
$is_check = $vrs->followUpClick($this->agentId); $is_check = $vrs->followUpClick($this->agentId);
if ($params["pageNo"] == 1 && !$is_check) { if ($params["pageNo"] == 1 && !$is_check) {
......
...@@ -43,17 +43,20 @@ class SearchService ...@@ -43,17 +43,20 @@ class SearchService
$condition->setStart($start_index); $condition->setStart($start_index);
$condition->setHits($page_size); $condition->setHits($page_size);
$condition->setAppName("tl_estate"); $condition->setAppName("tl_estate");
$agent_condition = "";
$search_content = !empty($params["search_content"]) ? $params["search_content"] : null; $search_content = !empty($params["search_content"]) ? $params["search_content"] : null;
if ($search_content && $agentId <= 0) { if ($search_content && $agentId <= 0) {
$condition->setQuery("content:'$search_content'"); $condition->setQuery("content:'$search_content'");
} else if ($search_content && $agentId > 0) { } else if ($search_content && $agentId > 0) {
$condition->setQuery("content:'$search_content'"); $condition->setQuery("content:'$search_content'");
$condition->setFilter("agent_id = '$agentId'"); //$condition->setFilter("agent_id = '$agentId'");
$agent_condition = " AND agent_id = '$agentId'";
} else if (!$search_content && $agentId > 0) { } else if (!$search_content && $agentId > 0) {
$condition->setQuery("agent_id:'$agentId'"); $condition->setQuery("agent_id:'$agentId'");
} }
$condition->addFilter("create_time > '$start_time'", " and create_time < '$end_time'"); //$condition->addFilter("create_time > '$start_time'", "AND create_time < '$end_time'");
$condition->setFilter("create_time > '$start_time' AND create_time < '$end_time'".$agent_condition);
$condition->setFormat("json"); $condition->setFormat("json");
$condition->addSort('id', SearchParamsBuilder::SORT_DECREASE); $condition->addSort('id', SearchParamsBuilder::SORT_DECREASE);
$condition->setFetchFields(array('id', 'user_id', 'agent_id', 'type', 'content', 'create_time', 'city', 'user_status', 'labels_id')); $condition->setFetchFields(array('id', 'user_id', 'agent_id', 'type', 'content', 'create_time', 'city', 'user_status', 'labels_id'));
......
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