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
5f0626d1
Commit
5f0626d1
authored
May 27, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f19c8e3a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
PayLogService.php
application/api_broker/service/PayLogService.php
+8
-2
No files found.
application/api_broker/service/PayLogService.php
View file @
5f0626d1
...
...
@@ -36,9 +36,10 @@ class PayLogService
/**
* 计算可以分佣的金额
* @param $pay_id
* @param $type
* @return int
*/
public
function
adjustment
(
$pay_id
)
public
function
adjustment
(
$pay_id
,
$type
=
1
)
{
//todo 1.计算剩余金额 查询调整表 2.减去退款 3.减去转账
$filed
=
"id,money"
;
...
...
@@ -54,6 +55,11 @@ class PayLogService
$adjustment_sum
=
$this
->
payLogAdjustmentModel
->
getAdjustmentSum
(
"money"
,
$where_
);
//减去退款
$refund_params
[
"pay_log_id"
]
=
$pay_id
;
if
(
$type
==
2
){
//驳回退款 不会改变入账的状态,驳回退款是为了让店长重新编辑上传的东西。
$refund_params
[
"status"
]
=
array
(
"neq"
,
4
);
}
$refund_sum
=
$this
->
oRefundModel
->
getRefundSum
(
"refund_money"
,
$refund_params
);
$residue_money
=
$pay_log_arr
[
"money"
]
-
$adjustment_sum
-
$refund_sum
;
...
...
@@ -176,7 +182,7 @@ class PayLogService
//验证金额是否合法
$payLogService
=
new
PayLogService
();
$residue_money
=
$payLogService
->
adjustment
(
$pay_log_id
);
$residue_money
=
$payLogService
->
adjustment
(
$pay_log_id
,
2
);
if
(
$residue_money
<
$refund_money
)
{
return
-
2
;
}
...
...
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