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
0bec686c
Commit
0bec686c
authored
Dec 19, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
bd6d0990
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
OrderLog.php
application/api_broker/controller/OrderLog.php
+2
-0
OrderLogService.php
application/api_broker/service/OrderLogService.php
+21
-0
No files found.
application/api_broker/controller/OrderLog.php
View file @
0bec686c
...
...
@@ -254,6 +254,8 @@ class OrderLog extends Basic
return
$this
->
response
(
"200"
,
"request success"
,
[
"bill_id"
=>
$is_ok
]);
}
elseif
(
$is_ok
==
-
1
){
return
$this
->
response
(
"101"
,
"付款类型或支付方式错误"
);
}
elseif
(
$is_ok
==
-
2
){
return
$this
->
response
(
"101"
,
"调整金额不能多于可被调整的金额"
);
}
return
$this
->
response
(
"101"
,
"request faild"
);
}
...
...
application/api_broker/service/OrderLogService.php
View file @
0bec686c
...
...
@@ -129,6 +129,12 @@ class OrderLogService
}
$money
=
$collecting
[
"money"
];
$type
=
$collecting
[
"type"
];
if
(
$pay_id
>
0
){
$is_ok
=
$this
->
verifyMoney
(
$pay_id
,
$money
);
if
(
$is_ok
!=
0
){
return
$is_ok
;
}
}
if
(
$father_id
==
0
)
{
$params
=
$this
->
collectingBillBin
(
$father_id
,
$collecting
,
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$house_number
,
$industry_type
,
$remark
,
$transfer_img
,
$source
,
$income_time
,
...
...
@@ -163,6 +169,21 @@ class OrderLogService
return
$father_id
;
}
/**
* 验证金额是否合法
* @param $pay_id
* @param $money
* @return int
*/
private
function
verifyMoney
(
$pay_id
,
$money
){
$payLogService
=
new
PayLogService
();
$residue_money
=
$payLogService
->
adjustment
(
$pay_id
);
if
(
$residue_money
<
$money
){
return
-
2
;
}
return
0
;
}
/**
* @param $type
* @param $pay_type
...
...
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