Commit 064fa40d authored by clone's avatar clone

bug

parent 70e249b7
...@@ -37,12 +37,12 @@ class Performance extends Basic ...@@ -37,12 +37,12 @@ class Performance extends Basic
{ {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
$params = $this->params; $params = $this->params;
/* $params = array( $params = array(
"agent_id" => 10015, "agent_id" => 10013,
"type" => 2, //1表示个人业绩排行 2门店 3区域 "type" => 1, //1表示个人业绩排行 2门店 3区域
"end_day" => "", "end_day" => "",
"start_day" =>"" "start_day" =>""
);*/ );
if (!isset($params["agent_id"]) || !isset($params["type"])) { if (!isset($params["agent_id"]) || !isset($params["type"])) {
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
} }
...@@ -69,13 +69,13 @@ class Performance extends Basic ...@@ -69,13 +69,13 @@ class Performance extends Basic
{ {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
$params = $this->params; $params = $this->params;
/* $params = array( $params = array(
"agent_id" => 1, "agent_id" => 10013,
"start_time" => "2018-03-23", "start_time" => "2018-04-11",
"end_time" => "2018-03-23", "end_time" => "2018-04-11",
"is_case" => 2,//1经纪人 2案场 "is_case" => 2,//1经纪人 2案场
"house_id" => 0 "house_id" => 0
);*/ );
if (!isset($params["agent_id"]) || !isset($params["start_time"]) || !isset($params["end_time"] )|| !isset($params["is_case"] )) { if (!isset($params["agent_id"]) || !isset($params["start_time"]) || !isset($params["end_time"] )|| !isset($params["is_case"] )) {
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
} }
...@@ -123,14 +123,14 @@ class Performance extends Basic ...@@ -123,14 +123,14 @@ class Performance extends Basic
{ {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
$params = $this->params; $params = $this->params;
/* $params = array( $params = array(
"agent_id" => 1, "agent_id" => 10013,
"start_time" => "2018-03-13", "start_time" => "2018-03-13",
"end_time" => "2018-03-26", "end_time" => "2018-04-10",
"is_case" => 2,//1经纪人 2案场 "is_case" => 2,//1经纪人 2案场
"house_id" => 0, "house_id" => 0,
"type" => 1 // 1带看 2进场 3收款 4成交报告 "type" => 1 // 1带看 2进场 3收款 4成交报告
);*/ );
if (!isset($params["agent_id"]) || !isset($params["start_time"]) || !isset($params["end_time"]) || !isset($params["type"])) { if (!isset($params["agent_id"]) || !isset($params["start_time"]) || !isset($params["end_time"]) || !isset($params["type"])) {
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
} }
......
...@@ -230,6 +230,9 @@ class PerformanceService ...@@ -230,6 +230,9 @@ class PerformanceService
$ids .= $item["houses_id"] . ","; $ids .= $item["houses_id"] . ",";
} }
$ids = rtrim($ids, ","); $ids = rtrim($ids, ",");
if(!$ids){ //代表没有案场
return null;
}
$params["house_ids"] = $ids; $params["house_ids"] = $ids;
} }
$condition['create_time'] = array( 'between', array( $start_time . " 00:00:00", $end_time . " 23:59:59" ) ); $condition['create_time'] = array( 'between', array( $start_time . " 00:00:00", $end_time . " 23:59:59" ) );
......
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