Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
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
chenchuanwen
my-yaf-project
Commits
4bc49986
Commit
4bc49986
authored
Dec 17, 2018
by
christ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pc
parent
251e786a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
RefundService.php
application/models/Business/Order/RefundService.php
+8
-3
CodeConfig.php
application/models/Error/CodeConfig.php
+2
-0
No files found.
application/models/Business/Order/RefundService.php
View file @
4bc49986
...
...
@@ -421,6 +421,12 @@ class RefundServiceModel extends \Business\AbstractModel
$whereRefund
[
'store_id'
]
=
$storeId
;
$whereRefund
[
'refund_id'
]
=
$refundId
;
$refund
=
$refundReturnDao
->
find
(
$whereRefund
);
//获取订单
$order_id
=
$refund
[
'order_id'
];
$order_info
=
$orderDao
->
find
(
array
(
'order_id'
=>
$order_id
));
if
((
$order_info
[
'order_amount'
]
-
$order_info
[
'refund_amount'
])
<
$refundAmount
){
ErrorModel
::
throwException
(
CodeConfigModel
::
beyongRefundAmount
);
}
if
(
$refund
[
'refund_type'
]
==
ApiConst
::
refundTypeGoods
){
if
(
$this
->
returnGoods
(
$storeId
,
$refundId
,
$seller_state
,
$refundAmount
,
$text
,
$isGiveUp
)){
$refundReturnDao
->
deleteRefundCache
(
$refund
[
'buyer_id'
],
$refund
[
'refund_id'
]);
...
...
@@ -439,9 +445,8 @@ class RefundServiceModel extends \Business\AbstractModel
ErrorModel
::
throwException
(
CodeConfigModel
::
alreadyExsitRefundGoods
);
}
//获取订单
$order_id
=
$refund
[
'order_id'
];
$order_info
=
$orderDao
->
find
(
array
(
'order_id'
=>
$order_id
));
$orderGoodsDao
=
\DAO\Order\OrderGoodsModel
::
getInstance
(
DbNameConst
::
masterDBConnectName
);
$orderData
[
'refund_amount'
]
=
$refundAmount
;
$orderDao
->
updateByOrderId
(
$orderData
,
$order_id
);
...
...
application/models/Error/CodeConfig.php
View file @
4bc49986
...
...
@@ -325,6 +325,7 @@ class CodeConfigModel
const
refundWriteError
=
300143
;
const
beyondRecieverTime
=
300144
;
const
payTypeUpdateError
=
30145
;
const
beyongRefundAmount
=
300146
;
//店铺相关错误码
//商品分类
...
...
@@ -832,6 +833,7 @@ class CodeConfigModel
self
::
refundWriteError
=>
'退款表写入失败'
,
self
::
beyondRecieverTime
=>
'设置收货时间不能早于当前时间'
,
self
::
payTypeUpdateError
=>
'更新支付类型失败'
,
self
::
beyongRefundAmount
=>
'退款金额不能超过可退款金额'
,
//销售员
self
::
emptySaleGoodsId
=>
'商品id不能为空'
,
self
::
emptySaleGoods
=>
'销售商品不存在'
,
...
...
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