where(['mall_id' => $mall_id, 'user_id' => $user_id, 'activity_id' => $activity_id, 'status' => StatusEnum::ENABLED]) ->count(); if ($seckillOrderNum >= $limitNum) { throw new Exception('您已达到活动限购上限,无法再参与活动'); } } } catch (Exception $e) { throw new Exception($e->getMessage()); } } }