From dfd22ce55a0912bfa03410adca217df34ed63b19 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Mon, 31 Jul 2023 16:24:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A9=E6=81=AF=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/model/store/order/StoreOrderInterest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/common/model/store/order/StoreOrderInterest.php b/app/common/model/store/order/StoreOrderInterest.php index fd715c88..c5dc74d9 100644 --- a/app/common/model/store/order/StoreOrderInterest.php +++ b/app/common/model/store/order/StoreOrderInterest.php @@ -27,6 +27,9 @@ class StoreOrderInterest extends BaseModel */ public function calculateInterest() { + if ($this->start_time == '0000-00-00 00:00:00') { + return 0; + } $days = ceil((time() - strtotime($this->start_time)) / 86400); $days = max($days ,0); $money = bcmul($this->total_price, ($this->rate / 100), 3);