OrderDelete.php 700 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * Author: 芸众商城 www.yunzshop.com
  5. * Date: 2017/2/28
  6. * Time: 上午11:21
  7. * comment: 订单删除
  8. */
  9. namespace app\frontend\modules\order\services\behavior;
  10. use app\common\models\Order;
  11. class OrderDelete extends OrderOperation
  12. {
  13. protected $statusBeforeChange = [ORDER::CLOSE, ORDER::COMPLETE];
  14. //protected $status_after_changed = -1;
  15. protected $name = '删除';
  16. protected $past_tense_class_name = 'OrderDeleted';
  17. /**
  18. * @return bool
  19. * @throws \app\common\exceptions\AppException
  20. */
  21. public function handle()
  22. {
  23. parent::handle();
  24. $this->is_member_deleted = 1;
  25. return $this->save();
  26. }
  27. }