Commit 565ed0f7 authored by christ's avatar christ

bug2644

parent acc52751
......@@ -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){
......
......@@ -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 获得订单商品记录
......
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