Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
03de5dbe
Commit
03de5dbe
authored
Apr 16, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注释
parent
9e751ecf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
19 deletions
+45
-19
MyCenter.php
application/api_broker/controller/MyCenter.php
+17
-18
Shop.php
application/api_broker/controller/Shop.php
+1
-1
Statement.php
application/api_broker/controller/Statement.php
+4
-0
StatementService.php
application/api_broker/service/StatementService.php
+23
-0
No files found.
application/api_broker/controller/MyCenter.php
View file @
03de5dbe
<?php
namespace
app\api_broker\controller
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\MyCenterService
;
use
think\Exception
;
...
...
@@ -12,8 +14,8 @@ use think\Request;
* Time : 下午1:34
* Intro:
*/
class
MyCenter
extends
Basic
{
class
MyCenter
extends
Basic
{
private
$service_
;
public
function
__construct
(
Request
$request
=
null
)
...
...
@@ -26,33 +28,30 @@ class MyCenter extends Basic{
* 我得个人中心
* @return \think\Response
*/
public
function
center
(){
public
function
center
()
{
$params
=
$this
->
params
;
/* $params = array(
"agent_id" => 1
);*/
// if(!isset($params["agent_id"])){
// return $this->response("101","请求参数错误");
// }
/* $params = array(
"agent_id" => 1
);*/
if
(
empty
(
$params
[
'agent_id'
]))
{
if
(
empty
(
$this
->
agentId
))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$agent_id
=
$this
->
agentId
;
}
else
{
$agent_id
=
$params
[
"agent_id"
];
}
try
{
try
{
$result
=
$this
->
service_
->
center
(
$agent_id
);
if
(
$result
)
{
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
if
(
$result
)
{
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
}
}
catch
(
Exception
$exception
)
{
return
$this
->
response
(
"101"
,
"request error, msg:"
.
$exception
);
}
catch
(
Exception
$exception
)
{
return
$this
->
response
(
"101"
,
"request error, msg:"
.
$exception
);
}
}
...
...
application/api_broker/controller/Shop.php
View file @
03de5dbe
...
...
@@ -190,7 +190,7 @@ class Shop extends Basic
*/
public
function
getShopDetail
()
{
header
(
'Access-Control-Allow-Origin:*'
);
/*$params = array(
"id" => 445,
"site_area" => 3, //1.c端 3.b端
...
...
application/api_broker/controller/Statement.php
View file @
03de5dbe
...
...
@@ -27,6 +27,10 @@ class Statement extends Basic
$this
->
service_
=
new
StatementService
();
}
/**
* 日报周报获取新增数据
* @return \think\Response
*/
public
function
dayStatement
()
{
header
(
'Access-Control-Allow-Origin:*'
);
...
...
application/api_broker/service/StatementService.php
View file @
03de5dbe
...
...
@@ -35,6 +35,7 @@ class StatementService
}
/**
* 获取日报周报数据统计 根据传入的经纪人id
* @param $agent_id
* @param $time_start
* @param $time_end
...
...
@@ -69,6 +70,15 @@ class StatementService
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
)
{
...
...
@@ -127,6 +137,13 @@ class StatementService
}
/**
* 获取门店业绩列表
* @param $conditions
* @param $agent_id
* @param $agent_name
* @return mixed
*/
private
function
getStoreList
(
$conditions
,
$agent_id
,
$agent_name
)
{
$conditions_
=
$conditions
;
...
...
@@ -141,6 +158,12 @@ class StatementService
}
/**
* 获取区域业绩列表
* @param $conditions
* @param $district_id
* @return mixed
*/
private
function
getDistrictList
(
$conditions
,
$district_id
)
{
//根据门店统计本周人数和上周人数
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment