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
80a27a0c
Commit
80a27a0c
authored
Jul 30, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
业绩加总条数
parent
b1b0abc2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
PerformanceService.php
application/api_broker/service/PerformanceService.php
+1
-0
TAgentTotalModel.php
application/model/TAgentTotalModel.php
+26
-0
No files found.
application/api_broker/service/PerformanceService.php
View file @
80a27a0c
...
...
@@ -89,6 +89,7 @@ class PerformanceService
$result
=
$this
->
totalModel
->
getTotalByAgentId
(
$field
,
$where_
,
$type
,
$order
);
//dump($result);
$arr
=
[];
$arr
[
'total'
]
=
$this
->
totalModel
->
getTotalByAgentIdCount
(
$field
,
$where_
,
$type
,
$order
);
$field
=
"a.name,a.img,b.store_name,c.district_name"
;
//dump($result);
$ranking_num
=
$request_source_type
==
0
?
5
:
100
;
//App显示前5 PC后台显示前100
...
...
application/model/TAgentTotalModel.php
View file @
80a27a0c
...
...
@@ -92,6 +92,32 @@ class TAgentTotalModel extends Model
}
public
function
getTotalByAgentIdCount
(
$field
,
$params
,
$type
,
$order
=
""
)
{
$group_
=
""
;
switch
(
$type
)
{
case
1
:
$group_
=
"agent_id"
;
break
;
case
2
:
$group_
=
"store_id"
;
break
;
case
3
:
$group_
=
"district_id"
;
break
;
}
$result
=
$this
->
db_
->
field
(
$field
)
->
where
(
$params
)
->
group
(
$group_
)
->
order
(
$order
)
->
count
();
// echo $this->db_->getLastSql();
return
$result
;
}
...
...
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