Commit 4429f99b authored by christ's avatar christ

messge

parent a9be1560
......@@ -232,8 +232,8 @@ class OrderGoodsModel extends \DAO\AbstractModel
public function getMustReduceAmount($orderGoodses, $discountAmount, $orderGoods)
{
$allNumbers = array_column($orderGoodses, 'goodsNum');
$allGoodsPrice = array_column($orderGoodses, 'goodsPrice');
$allNumbers = array_sum($orderGoodses, 'goodsNum');
$allGoodsPrice = array_sum($orderGoodses, 'goodsPrice');
$allMoney = $allNumbers * $allGoodsPrice;
$thisOrderGoodsAmount = $orderGoods['goodsNum'] * $orderGoods['goodsPrice'];
$reduceAmount=($discountAmount*$thisOrderGoodsAmount)/($allMoney);
......
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