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