Commit 66fd4dad authored by christ's avatar christ

Merge branch 'linqing' of git.shenbd.com:qm-develop/shenbd into ccw

parents f6fbde7a b7d7ae96
...@@ -1022,7 +1022,6 @@ class RefundServiceModel extends \Business\AbstractModel ...@@ -1022,7 +1022,6 @@ class RefundServiceModel extends \Business\AbstractModel
// $shippingFee == ApiConst::zero; // $shippingFee == ApiConst::zero;
// } // }
$orderGoodsConvert = $orderGoodsDao->getRefundOrderGoods($orderGoods); $orderGoodsConvert = $orderGoodsDao->getRefundOrderGoods($orderGoods);
$returnData = array( $returnData = array(
'orderId' => (int)$orderId, 'orderId' => (int)$orderId,
'orderSn'=>$orderInfo['orderSn'], 'orderSn'=>$orderInfo['orderSn'],
......
...@@ -646,6 +646,9 @@ class MemberModel extends \DAO\AbstractModel ...@@ -646,6 +646,9 @@ class MemberModel extends \DAO\AbstractModel
} }
public function getListMemberUrl($list){ public function getListMemberUrl($list){
foreach($list as &$li){ foreach($list as &$li){
if(!Common::checkMobilePhone($li['memberMobile'])){
$li['memberMobile']='';
}
$li['memberAvatar']=$this->getMemberAvatarUrl($li['memberId'],$li['memberAvatar']); $li['memberAvatar']=$this->getMemberAvatarUrl($li['memberId'],$li['memberAvatar']);
} }
return $list; return $list;
......
...@@ -230,14 +230,18 @@ class OrderGoodsModel extends \DAO\AbstractModel ...@@ -230,14 +230,18 @@ class OrderGoodsModel extends \DAO\AbstractModel
); );
} }
public function getMustReduceAmount($orderGoodses, $discountAmount, $orderGoods) public function getMustReduceAmount($orderGoodses, $discountAmount, $convertOrderGoods)
{ {
$allNumbers = array_column($orderGoodses, 'goodsNum'); $allMoney=0;
$allNumbers=array_sum($allNumbers); foreach($orderGoodses as &$orderGoods){
$allGoodsPrice = array_column($orderGoodses, 'goodsPrice'); $allMoney+= $orderGoods['goodsNum']*$orderGoods['goodsPrice'];
$allGoodsPrice=array_sum($allGoodsPrice); }
$allMoney = $allNumbers * $allGoodsPrice; // $allNumbers = array_column($orderGoodses, 'goodsNum');
$thisOrderGoodsAmount = $orderGoods['goodsNum'] * $orderGoods['goodsPrice']; // $allNumbers=array_sum($allNumbers);
// $allGoodsPrice = array_column($orderGoodses, 'goodsPrice');
// $allGoodsPrice=array_sum($allGoodsPrice);
// $allMoney = $allNumbers * $allGoodsPrice;
$thisOrderGoodsAmount = $convertOrderGoods['goodsNum'] * $convertOrderGoods['goodsPrice'];
$reduceAmount=($discountAmount*$thisOrderGoodsAmount)/($allMoney); $reduceAmount=($discountAmount*$thisOrderGoodsAmount)/($allMoney);
return round($reduceAmount); return round($reduceAmount);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment