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
565ed0f7
Commit
565ed0f7
authored
Dec 13, 2018
by
christ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug2644
parent
acc52751
Hide 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
-2
OrderGoods.php
application/models/DAO/Order/OrderGoods.php
+2
-1
No files found.
application/models/Business/Order/RefundService.php
View file @
565ed0f7
...
...
@@ -992,6 +992,7 @@ class RefundServiceModel extends \Business\AbstractModel
$orderGoodses
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\RefundReasonRedisModel
::
getInstance
(),
array
(
&
$orderGoodsDao
,
'getOrderGoodsByOrderIds'
),
array
(
$orderInfo
[
'orderId'
],
$this
->
orderGoodsField
),
\Our\ApiConst
::
oneDaySecond
);
$orderGoodses
=
$orderGoodsDao
->
convertOrderGoods
(
$orderGoodses
,
'goodsId'
);
$goodsIds
=
$orderGoodsDao
->
getRefundOrderGoodsIds
(
$orderGoodses
);
$alreadyRefundGoodsIds
=
$goodsIds
;
// $this->store=$storeDao->get($this->order['storeId']);
// $this->store=Common::convertUnderline($this->store[0]);
$this
->
store
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$storeDao
,
'getInfoById'
),
array
(
$orderInfo
[
'storeId'
],
$storeDao
->
detailField
),
\Our\ApiConst
::
sevenDaySecond
,
array
(
$orderInfo
[
'storeId'
]));
...
...
@@ -1046,10 +1047,15 @@ class RefundServiceModel extends \Business\AbstractModel
$refundAmount
=
$orderInfo
[
'orderAmount'
]
-
$orderInfo
[
'shippingFee'
]
-
ApiConst
::
zero
;;
}
}
$refundAmount
=
$refundAmount
-
$discountAmount
;
if
(
!
$alreadyRefundGoodsIds
){
$refundAmount
=
$refundAmount
-
$discountAmount
;
}
}
else
{
$refundAmount
=
$orderGoods
[
'goodsPrice'
]
*
$orderGoods
[
'goodsNum'
];
$refundAmount
=
$refundAmount
-
$discountAmount
;
if
(
!
$alreadyRefundGoodsIds
){
$refundAmount
=
$refundAmount
-
$discountAmount
;
}
}
$returnData
[
'refundAmount'
]
=
$refundAmount
-
$orderInfo
[
'refundAmount'
]
-
$returnData
[
'needShippingFee'
]
+
$shippingFee
;
if
((
int
)
$returnData
[
'refundAmount'
]
<
ApiConst
::
zero
){
...
...
application/models/DAO/Order/OrderGoods.php
View file @
565ed0f7
...
...
@@ -165,7 +165,8 @@ class OrderGoodsModel extends \DAO\AbstractModel {
// unset($orderGoods[$i]);
}
}
return
array_column
(
$newOrderGoods
,
'goodsId'
);
$goodsIds
=
array_column
(
$newOrderGoods
,
'goodsId'
);
return
$goodsIds
;
}
/**
* 根据订单id 获得订单商品记录
...
...
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