Commit 49ea5477 authored by clone's avatar clone

bug

parent 7c26dd17
...@@ -101,11 +101,11 @@ class Performance extends Basic ...@@ -101,11 +101,11 @@ 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" => 6, "agent_id" => 6,
"start_time" => "2018-04-09", "start_time" => "2018-04-09",
"end_time" => "2018-04-12", "end_time" => "2018-04-12",
);*/ );
try { try {
$result = $this->service_->storePerformance($params["agent_id"], $params["start_time"], $params["end_time"]); $result = $this->service_->storePerformance($params["agent_id"], $params["start_time"], $params["end_time"]);
return $this->response("200", "request success", $result); return $this->response("200", "request success", $result);
...@@ -158,7 +158,7 @@ class Performance extends Basic ...@@ -158,7 +158,7 @@ class Performance extends Basic
/* $params = array( /* $params = array(
"agent_id" => 6, "agent_id" => 6,
"is_store" => 1,//1经纪人排行 2门店 "is_store" => 1,//1经纪人排行 2门店
"start_time" => "2018-04-09", "start_time" => "2018-04-12",
"end_time" => "2018-04-12", "end_time" => "2018-04-12",
);*/ );*/
......
...@@ -378,8 +378,7 @@ class PerformanceService ...@@ -378,8 +378,7 @@ class PerformanceService
$now_date = date("Y-m-d", time()); $now_date = date("Y-m-d", time());
if ($start_time == $now_date && $end_time == $now_date) { if ($start_time == $now_date && $end_time == $now_date) {
/* $params["id"] = array( "in", $agent_ids ); $param["id"] = array( "in", $agent_ids );
// dump($agent_ids);
//todo 1.获取所有经纪人 //todo 1.获取所有经纪人
$field = "id as agent_id,store_id"; $field = "id as agent_id,store_id";
...@@ -387,7 +386,7 @@ class PerformanceService ...@@ -387,7 +386,7 @@ class PerformanceService
if ($is_store == 2) { if ($is_store == 2) {
$group = "store_id"; $group = "store_id";
} }
$list = $this->agentModel->getAgentsList($field, $params, $group); $list = $this->agentModel->getAgentsList($field, $param, $group);
//dump($list); //dump($list);
foreach ($list as $key => $item) { foreach ($list as $key => $item) {
$totalParams['create_time'] = array( 'between', array( $start_time . " 00:00:00", $end_time . " 23:59:59" ) ); $totalParams['create_time'] = array( 'between', array( $start_time . " 00:00:00", $end_time . " 23:59:59" ) );
...@@ -419,7 +418,7 @@ class PerformanceService ...@@ -419,7 +418,7 @@ class PerformanceService
if($sum <= 0){ if($sum <= 0){
unset($list[$key]); unset($list[$key]);
} }
}*/ }
} else { } else {
......
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