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
0040a887
Commit
0040a887
authored
Aug 27, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收款列表增加时间计算总佣金
parent
b814511b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
Collection.php
application/index/controller/Collection.php
+20
-1
OPayLogModel.php
application/model/OPayLogModel.php
+3
-2
No files found.
application/index/controller/Collection.php
View file @
0040a887
...
...
@@ -98,8 +98,27 @@ class Collection extends Basic
c.report_agent_name,f.store_name,g.district_name'
;
$data
[
'data'
][
'list'
]
=
$order
->
getAddPayLogOrderListLmit
(
$pageNo
,
$pageSize
,
$order_
=
'a.id desc'
,
$field
,
$where
);
$data
[
'data'
][
'total'
]
=
$order
->
getAddPayLogOrderListLmitTotal
(
$where
);
$data
[
'data'
][
'money_total'
]
=
$order
->
getMoneyTotal
();
//总额
//加时间条件
if
(
$where
[
'a.create_time'
])
{
if
(
!
empty
(
$this
->
params
[
'start_time'
])
&&
empty
(
$this
->
params
[
'end_time'
]))
{
$pay_where
[
'create_time'
]
=
[
'> time'
,
$this
->
params
[
'start_time'
]
.
' 00:00:00'
];
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
empty
(
$this
->
params
[
'start_time'
]))
{
$pay_where
[
'create_time'
]
=
[
'< time'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
];
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
!
empty
(
$this
->
params
[
'start_time'
]))
{
$pay_where
[
'create_time'
]
=
[
'between time'
,
[
$this
->
params
[
'start_time'
]
.
' 00:00:00'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
]];
}
$data
[
'data'
][
'money_total'
]
=
$order
->
getMoneyTotal
(
$pay_where
);
//总额
}
else
{
$data
[
'data'
][
'money_total'
]
=
''
;
}
foreach
(
$data
[
'data'
][
'list'
]
as
$k
=>
$v
)
{
if
(
!
empty
(
$v
[
'user_phone'
]))
{
$data
[
'data'
][
'list'
][
$k
][
'user_phone'
]
=
substr_replace
(
$v
[
'user_phone'
],
'****'
,
3
,
4
);
...
...
application/model/OPayLogModel.php
View file @
0040a887
...
...
@@ -376,10 +376,11 @@ class OPayLogModel extends Model
/**
* 订单总额
*
* @param $where
* @return float|int
*/
public
function
getMoneyTotal
()
{
return
$this
->
sum
(
'money'
);
public
function
getMoneyTotal
(
$where
)
{
return
$this
->
where
(
$where
)
->
sum
(
'money'
);
}
/**
...
...
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