AgentMarketingEvent.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. namespace common\events\data\api;
  3. use common\components\BaseEvent;
  4. use common\fixtures\ListData;
  5. use common\enums\EventNameEnum;
  6. //渠道分红、渠道业绩内购抵扣
  7. class AgentMarketingEvent extends BaseEvent
  8. {
  9. public $name = EventNameEnum::AGENT_GOODS_DEDUCT;
  10. public $item;
  11. public $form;
  12. public $extra;
  13. public function __construct($mall_id, $item, $form, $extra)
  14. {
  15. parent::__construct($mall_id);
  16. $this->item = $item;
  17. $this->form = $form;
  18. $this->extra = $extra;
  19. }
  20. public function getItem()
  21. {
  22. return $this->item;
  23. }
  24. public function getForm()
  25. {
  26. return $this->form;
  27. }
  28. public function getExtra()
  29. {
  30. return $this->extra;
  31. }
  32. /**
  33. * @return void
  34. */
  35. public function setItem($item)
  36. {
  37. $this->item = $item;
  38. }
  39. public function setForm($form)
  40. {
  41. $this->form = $form;
  42. }
  43. public function setExtra($extra)
  44. {
  45. $this->extra = $extra;
  46. }
  47. /**
  48. * @return BaseOrderForm|boolean
  49. */
  50. public function getResultForm()
  51. {
  52. // if ($this->isError) return false;
  53. $data = [
  54. 'item' => $this->item,
  55. 'form' => $this->form,
  56. 'extra' => $this->extra,
  57. ];
  58. return $data;
  59. }
  60. }