Commit c7d553d8 authored by clone's avatar clone

Merge branch 'test'

parents 9b759d36 9b2e9395
......@@ -51,14 +51,15 @@ class HomePageLog extends Basic
public function userFollowUpList()
{
$params = $this->params;
/* $params = array(
"start_time" => strtotime('2019-01-01 15:47:36'), //开始时间
"end_time" => strtotime('2019-01-30 15:47:36'), //结束时间
//"name_or_phone" => "18112347151",//用户姓名或电话 经纪人
//"search_content" => "酸菜",// 搜索跟进内容
/* $params = array(
"start_time" => strtotime('2019-04-01 15:47:36'), //开始时间
"end_time" => strtotime('2019-04-07 15:47:36'), //结束时间
"name_or_phone" => "黄莉",//用户姓名或电话 经纪人
"search_content" => "奶茶",// 搜索跟进内容
"pageNo" => 1,
"pageSize" => 15
);*/
);
$this->siteId = 10001;*/
$vrs = new VerifyRepetitionService();
$is_check = $vrs->followUpClick($this->agentId);
if ($params["pageNo"] == 1 && !$is_check) {
......
......@@ -90,8 +90,12 @@ class Remark extends Basic
$site_id = $this->params['site_id'];
}
$if_search = false;
$is_today = true;
if (date('Y-m-d') == $this->params['start_date'] && date('Y-m-d') == $this->params['end_date']) {
$is_today = false;
}
if ($site_id == "10001" && ($this->params['agent_id'] > 0 || !empty($this->params["content"])) && empty($this->params['user_id'])) {
if ($site_id == "10001" && ($this->params['agent_id'] > 0 || !empty($this->params["content"])) && $is_today) {
$searchService = new SearchService();
$this->params['search_content'] = $this->params['content'];
$this->params['start_time'] = strtotime($this->params['start_date']);
......
......@@ -43,17 +43,20 @@ class SearchService
$condition->setStart($start_index);
$condition->setHits($page_size);
$condition->setAppName("tl_estate");
$agent_condition = "";
$search_content = !empty($params["search_content"]) ? $params["search_content"] : null;
if ($search_content && $agentId <= 0) {
$condition->setQuery("content:'$search_content'");
} else if ($search_content && $agentId > 0) {
$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) {
$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->addSort('id', SearchParamsBuilder::SORT_DECREASE);
$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