Commit 03de5dbe authored by clone's avatar clone

注释

parent 9e751ecf
<?php <?php
namespace app\api_broker\controller; namespace app\api_broker\controller;
use app\api_broker\extend\Basic; use app\api_broker\extend\Basic;
use app\api_broker\service\MyCenterService; use app\api_broker\service\MyCenterService;
use think\Exception; use think\Exception;
...@@ -12,8 +14,8 @@ use think\Request; ...@@ -12,8 +14,8 @@ use think\Request;
* Time : 下午1:34 * Time : 下午1:34
* Intro: * Intro:
*/ */
class MyCenter extends Basic
class MyCenter extends Basic{ {
private $service_; private $service_;
public function __construct(Request $request = null) public function __construct(Request $request = null)
...@@ -26,33 +28,30 @@ class MyCenter extends Basic{ ...@@ -26,33 +28,30 @@ class MyCenter extends Basic{
* 我得个人中心 * 我得个人中心
* @return \think\Response * @return \think\Response
*/ */
public function center(){ public function center()
{
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"agent_id" => 1 "agent_id" => 1
);*/ );*/
// if(!isset($params["agent_id"])){
// return $this->response("101","请求参数错误");
// }
if (empty($params['agent_id'])) { if (empty($params['agent_id'])) {
if (empty($this->agentId)) { if (empty($this->agentId)) {
return $this->response("101","请求参数错误"); return $this->response("101", "请求参数错误");
} }
$agent_id = $this->agentId; $agent_id = $this->agentId;
} else { } else {
$agent_id = $params["agent_id"]; $agent_id = $params["agent_id"];
} }
try{ try {
$result = $this->service_->center($agent_id); $result = $this->service_->center($agent_id);
if($result){ if ($result) {
return $this->response("200","request success",$result); return $this->response("200", "request success", $result);
}else{ } else {
return $this->response("200","request null"); return $this->response("200", "request null");
} }
}catch (Exception $exception){ } catch (Exception $exception) {
return $this->response("101","request error, msg:" . $exception); return $this->response("101", "request error, msg:" . $exception);
} }
} }
......
...@@ -190,7 +190,7 @@ class Shop extends Basic ...@@ -190,7 +190,7 @@ class Shop extends Basic
*/ */
public function getShopDetail() public function getShopDetail()
{ {
header('Access-Control-Allow-Origin:*');
/*$params = array( /*$params = array(
"id" => 445, "id" => 445,
"site_area" => 3, //1.c端 3.b端 "site_area" => 3, //1.c端 3.b端
......
...@@ -27,6 +27,10 @@ class Statement extends Basic ...@@ -27,6 +27,10 @@ class Statement extends Basic
$this->service_ = new StatementService(); $this->service_ = new StatementService();
} }
/**
* 日报周报获取新增数据
* @return \think\Response
*/
public function dayStatement() public function dayStatement()
{ {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
......
...@@ -35,6 +35,7 @@ class StatementService ...@@ -35,6 +35,7 @@ class StatementService
} }
/** /**
* 获取日报周报数据统计 根据传入的经纪人id
* @param $agent_id * @param $agent_id
* @param $time_start * @param $time_start
* @param $time_end * @param $time_end
...@@ -69,6 +70,15 @@ class StatementService ...@@ -69,6 +70,15 @@ class StatementService
return $this->selectStatement($conditions, $user_type, $store_id, $district_id); return $this->selectStatement($conditions, $user_type, $store_id, $district_id);
} }
/**
* 统计数据
* @param $conditions
* @param $user_type
* @param $store_id
* @param $district_id
* @return array
*/
private function selectStatement($conditions, $user_type, $store_id, $district_id) private function selectStatement($conditions, $user_type, $store_id, $district_id)
{ {
...@@ -127,6 +137,13 @@ class StatementService ...@@ -127,6 +137,13 @@ class StatementService
} }
/**
* 获取门店业绩列表
* @param $conditions
* @param $agent_id
* @param $agent_name
* @return mixed
*/
private function getStoreList($conditions, $agent_id, $agent_name) private function getStoreList($conditions, $agent_id, $agent_name)
{ {
$conditions_ = $conditions; $conditions_ = $conditions;
...@@ -141,6 +158,12 @@ class StatementService ...@@ -141,6 +158,12 @@ class StatementService
} }
/**
* 获取区域业绩列表
* @param $conditions
* @param $district_id
* @return mixed
*/
private function getDistrictList($conditions, $district_id) private function getDistrictList($conditions, $district_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