getGoodsDeduction()->getMaxFixedAmount() * $this->getOrderGoods()->total; //todo blank 两种抵扣同时使用问题,订单商品金额已小于抵扣金额则获取最低金额 2022/3/3 $amount = min($result, $this->orderGoods->getPriceBefore($this->getGoodsDeduction()->getCode() . 'Deduction')); return max($amount, 0); } /** * @return float|mixed * @throws \app\common\exceptions\ShopException */ public function getMinAmount() { $result = $this->getGoodsDeduction()->getMinFixedAmount() * $this->getOrderGoods()->total; //$result = min($result,$this->getOrderGoods()->getPriceBeforeWeight($this->getGoodsDeduction()->getCode().'Deduction')); return max($result, 0); } public function hasMinAmount(){ return $this->getGoodsDeduction()->getMinFixedAmount() > 0; } }