diff --git a/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php b/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php index f17a8afcc..9446b81c9 100644 --- a/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php +++ b/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php @@ -217,7 +217,7 @@ class PurchaseProductOfferLogic extends BaseLogic $offer = PurchaseProductOffer::where(['id' => $params['id']])->find(); $lastPrice = PurchaseProductOffer::where(['product_id' => $offer['product_id']])->where('status', 1)->order('id desc')->value('price'); $currentPrice = bcdiv($params['total_price'], $params['buyer_nums'], 2); - if (!empty($lastPrice) && ($currentPrice > $lastPrice * 3 || $currentPrice < $lastPrice / 3)) { + if ($lastPrice > 0 && ($currentPrice > $lastPrice * 3 || $currentPrice < $lastPrice / 3)) { throw new BusinessException('价格异常,请重新输入'); } // $uid=Admin::where('id',$params['admin_id'])->value('uid');