MchEnum.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. namespace addons\Mch\common\enums;
  3. use common\enums\AddonsEnum;
  4. use common\enums\BaseEnum;
  5. use common\enums\ShippingTypeEnum;
  6. /**
  7. * Class AddonsCouponEnum
  8. * @package addons\Coupon\common\enums
  9. */
  10. class MchEnum extends BaseEnum
  11. {
  12. const ADDONS_NAME = AddonsEnum::ADDONS_NAME_MCH;
  13. const SUPPLIER_SELF = 0;//自身
  14. const SELF_MALL = 1;//商城
  15. const SELF_MCH = 2;//多商户
  16. const SELF_STORE = 3;//门店
  17. const REPEAL = -4;
  18. // 审核状态
  19. const CHECK_WAITING = 0; // 待审核
  20. const CHECK_ADOPT = 1; // 审核通过
  21. const CHECK_FAILED = 2; // 审核未通过
  22. public static function setpArrMap($order_status,$shipping_type_text)
  23. {
  24. switch ($order_status) {
  25. case self::REPEAL :
  26. $setpArr = [
  27. [
  28. 'title' => '买家下单',
  29. 'field' => 'created_at',
  30. ],
  31. [
  32. 'title' => '交易关闭',
  33. 'field' => 'close_time',
  34. ],
  35. ];
  36. break;
  37. default :
  38. $setpArr = [
  39. [
  40. 'title' => '买家下单',
  41. 'field' => 'created_at',
  42. ],
  43. [
  44. 'title' => '买家付款',
  45. 'field' => 'pay_time',
  46. ],
  47. [
  48. 'title' => $shipping_type_text,
  49. 'field' => 'consign_time',
  50. ],
  51. [
  52. 'title' => '交易完成',
  53. 'field' => 'finish_time',
  54. ],
  55. ];
  56. }
  57. return $setpArr;
  58. }
  59. public static function getMap(): array
  60. {
  61. return [];
  62. }
  63. }