is_pay) throw new \Exception('该订单还未支付定金'); $form['deposit_presale_order'] = $deposit_presale_order; $time = time(); $deposit_presale_active = DepositPresaleActive::findOne(['id' => $deposit_presale_order->deposit_presale_active_id, 'mall_id' => $form['mall_id']]); if (empty($deposit_presale_active)) throw new \Exception('活动不存在'); if ($time < $deposit_presale_active['final_payment_start_at']) throw new \Exception('还未到支付尾款的时间'); if ($time > $deposit_presale_active['final_payment_end_at']) throw new \Exception('已过了支付尾款的时间'); // if($deposit_presale_active['group_status'] == DepositPresaleEnum::GROUP_FINISH) throw new \Exception('该预售活动已结束'); } }