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
9f970f5d
Commit
9f970f5d
authored
Jul 18, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
业绩汇总 默认改为本月
parent
fbf0669b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
Performance.php
application/api_broker/controller/Performance.php
+6
-3
No files found.
application/api_broker/controller/Performance.php
View file @
9f970f5d
...
@@ -37,7 +37,7 @@ class Performance extends Basic
...
@@ -37,7 +37,7 @@ 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" => 80,
"agent_id" => 80,
"type" => 3, //1表示个人业绩排行 2门店 3区域
"type" => 3, //1表示个人业绩排行 2门店 3区域
"end_day" => "",
"end_day" => "",
...
@@ -46,9 +46,12 @@ class Performance extends Basic
...
@@ -46,9 +46,12 @@ class Performance extends Basic
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"type"
]))
{
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"type"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
//默认排序一周
//默认排序一周
2018-07-18改为本月
$end_day
=
!
empty
(
$params
[
"end_day"
])
?
$params
[
"end_day"
]
:
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));
$end_day
=
!
empty
(
$params
[
"end_day"
])
?
$params
[
"end_day"
]
:
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));
$start_day
=
!
empty
(
$params
[
"start_day"
])
?
$params
[
"start_day"
]
:
date
(
"Y-m-d"
,
strtotime
(
"-7 day"
));
//$start_day = !empty($params["start_day"]) ? $params["start_day"] : date("Y-m-d", strtotime("-7 day"));
$start_day
=
!
empty
(
$params
[
"start_day"
])
?
$params
[
"start_day"
]
:
date
(
"Y-m-01"
,
time
());
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"agent_id"
],
$params
[
"type"
],
$end_day
,
$start_day
);
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"agent_id"
],
$params
[
"type"
],
$end_day
,
$start_day
);
//dump($list);
//dump($list);
if
(
count
(
$list
)
>
0
)
{
if
(
count
(
$list
)
>
0
)
{
...
...
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