withdraw_sn = $withdraw_sn; $this->setWithdrawModel(); } public function getWithdrawModel() { return $this->withdrawModel; } private function setWithdrawModel() { $withdrawModel = Withdraw::where('withdraw_sn', $this->withdraw_sn)->first(); if (!$withdrawModel) { throw new ShopException("提现记录不存在,单号:{$this->withdraw_sn}"); } $this->withdrawModel = $withdrawModel; } }