setAttribute('reject_reason', $this->getRequest()->input('reject_reason')); $this->setAttribute('status', self::REJECT); $this->setAttribute('reject_time', time()); } protected function updateAfter() { $this->cancelRefund(); //取消申请删除记录 $this->delRefundOrderGoodsLog(); } protected function writeLog() { $detail = [ '驳回原因:'.$this->reject_reason, ]; $processLog = RefundProcessLog::logInstance($this, RefundProcessLog::OPERATOR_SHOP); $processLog->setAttribute('operate_type', RefundProcessLog::OPERATE_REJECT); $processLog->saveLog($detail); } protected function sendMessage() { RefundMessageService::rejectMessage($this);//通知买家 if (app('plugins')->isEnabled('instation-message')) { //开启了站内消息插件 event(new \Yunshop\InstationMessage\event\RejectOrderRefundEvent($this)); } } }