DepositPresaleEnum.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?php
  2. namespace addons\DepositPresale\common\enums;
  3. use common\enums\BaseEnum;
  4. use common\enums\OrderStatusEnum;
  5. class DepositPresaleEnum extends BaseEnum
  6. {
  7. const ADDONS_NAME = 'DepositPresale';
  8. const NOT_PAY = 0; //待支付
  9. const JOINING = 1; //参团中
  10. const GROUP_SUCCESS = 2; //定金预售成功
  11. const GROUP_FAILURE = 3; //定金预售失败
  12. const GROUP_CLOSE = 4; //关闭
  13. const ORDER_RECEIPT = 5; //收货
  14. const NOT_STARTED = 0; //未开始
  15. const OPEN_GROUP = 1; //开团中
  16. const GROUP_FINISH = 2; //已结束
  17. //is_commander是否团长
  18. const NO_COMMANDER = 0; //否
  19. const IS_COMMANDER = 1; //是
  20. const NOTIFY_CLASS = 'addons\DepositPresale\common\logic\notify\Notify';
  21. const FINAL_NOTIFY_CLASS = 'addons\DepositPresale\common\logic\notify\FinalPaymentNotify';
  22. const DEPOSIT_PRESALE_ORDER_CREATE = 'deposit_presale_order_create';
  23. public static function getMap(): array
  24. {
  25. return [];
  26. }
  27. public static function getOrderStatusMap()
  28. {
  29. return [
  30. self::NOT_PAY => '待支付定金',
  31. self::JOINING => '待支付尾款',
  32. self::GROUP_SUCCESS => '下单成功',
  33. self::GROUP_FAILURE => '下单失败',
  34. self::GROUP_CLOSE => '已关闭',
  35. ];
  36. }
  37. public static function getGroupStatusMap()
  38. {
  39. return [
  40. self::NOT_STARTED => '即将预售',
  41. self::OPEN_GROUP => '预售中',
  42. // self::GROUP_FINISH=>'已结束',
  43. ];
  44. }
  45. /**
  46. * 订单状态追踪
  47. * @return \string[][]
  48. */
  49. public static function setpArrMap()
  50. {
  51. return [
  52. [
  53. 'title' => '买家下单',
  54. 'field' => 'created_at',
  55. ],
  56. [
  57. 'title' => '买家支付定金',
  58. 'field' => 'deposite_pay_time',
  59. ],
  60. [
  61. 'title' => '买家支付尾款',
  62. 'field' => 'final_payment_time',
  63. ],
  64. [
  65. 'title' => '商家发货',
  66. 'field' => 'consign_time',
  67. ],
  68. [
  69. 'title' => '交易完成',
  70. 'field' => 'finish_time',
  71. ],
  72. ];
  73. }
  74. /**
  75. * @return array
  76. */
  77. public static function getMainOrderStatusMap(): array
  78. {
  79. return [
  80. OrderStatusEnum::NOT_PAY => '待付款',
  81. OrderStatusEnum::PAY => '待发货', // 已付款
  82. OrderStatusEnum::SHIPMENTS => '已发货',
  83. OrderStatusEnum::SING => '已收货',
  84. OrderStatusEnum::ACCOMPLISH => '已完成',
  85. OrderStatusEnum::REPEAL => '已关闭',
  86. OrderStatusEnum::ALL => '全部',
  87. ];
  88. }
  89. }