59 lines
1.1 KiB
PHP
59 lines
1.1 KiB
PHP
<?php
|
|
|
|
|
|
namespace Yunshop\AreaDividend\event;
|
|
|
|
use app\common\events\Event;
|
|
|
|
class BeforeAreaDividendCreatedEvent extends Event
|
|
{
|
|
|
|
protected $order;
|
|
protected $extra_plugin_id;
|
|
protected $extra_id;
|
|
protected $is_break;
|
|
protected $break_message;
|
|
|
|
public function __construct($order, $extra_plugin_id, $extra_id)
|
|
{
|
|
// \Log::debug('区域分红:创建执行前事件', $order->id);
|
|
$this->order = $order;
|
|
$this->extra_plugin_id = $extra_plugin_id;
|
|
$this->extra_id = $extra_id;
|
|
$this->is_break = 0;
|
|
$this->break_message = '';
|
|
}
|
|
|
|
public function getOrderModel()
|
|
{
|
|
return $this->order;
|
|
}
|
|
|
|
public function getExtraPluginId()
|
|
{
|
|
return $this->extra_plugin_id;
|
|
}
|
|
|
|
public function getExtraId()
|
|
{
|
|
return $this->extra_id;
|
|
}
|
|
|
|
public function isBreak()
|
|
{
|
|
return $this->is_break;
|
|
}
|
|
|
|
public function setBreak($message = '')
|
|
{
|
|
$this->is_break = 1;
|
|
$this->break_message = $message ?: '';
|
|
}
|
|
|
|
public function breakMessage()
|
|
{
|
|
return $this->break_message;
|
|
}
|
|
|
|
|
|
} |