| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- /**
- * Created by PhpStorm.
- * Author: 芸众商城 www.yunzshop.com
- * Date: 2017/3/3
- * Time: 下午3:43
- */
- namespace app\backend\modules\refund\services\operation;
- use app\common\events\order\AfterOrderRefundPassEvent;
- use app\common\models\refund\RefundProcessLog;
- /**
- * 同意退换货申请-
- * Class RefundPass
- * @package app\backend\modules\refund\services\operation
- */
- class RefundPass extends RefundOperation
- {
- protected $statusBeforeChange = [self::WAIT_CHECK];
- protected $statusAfterChanged = self::WAIT_RETURN_GOODS;
- protected $name = '通过';
- protected $timeField = 'operate_time';
- protected function updateBefore()
- {
- $this->fill([
- 'remark' => $this->getRequest()->input('message'),
- 'refund_address' => $this->getRequest()->input('refund_address'),
- ]);
- }
- protected function updateAfter()
- {
- }
- protected function writeLog()
- {
- $detail = [
- '等待买家退货',
- ];
- $processLog = RefundProcessLog::logInstance($this, RefundProcessLog::OPERATOR_SHOP);
- $processLog->setAttribute('operate_type', RefundProcessLog::OPERATE_AGREE_APPLY);
- $processLog->saveLog($detail);
- }
- protected function sendMessage()
- {
- if (app('plugins')->isEnabled('instation-message')) {
- //开启了站内消息插件
- event(new \Yunshop\InstationMessage\event\PassOrderRefundEvent($this));
- }
- parent::sendMessage(); // TODO: Change the autogenerated stub
- }
- protected function afterEventClass()
- {
- return new AfterOrderRefundPassEvent($this);
- }
- }
|