PayGroupEnum.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. namespace addons\TinyShop\common\enums;
  3. use common\enums\BaseEnum;
  4. /**
  5. * Class PayGroupEnum
  6. * @package addons\TinyShop\common\enums
  7. */
  8. class PayGroupEnum extends BaseEnum
  9. {
  10. const ORDER = 'order';
  11. const ORDER_UNITE = 'orderUnite';
  12. const ORDER_BATCH = 'orderBatch';
  13. const ORDER_UNITE_BATCH = 'orderUniteBatch';
  14. const RECHARGE = 'recharge';
  15. /**
  16. * @return array
  17. */
  18. public static function getMap(): array
  19. {
  20. return [
  21. self::ORDER => '订单支付',
  22. self::ORDER_UNITE => '订单混合支付', // 余额 + 第三方支付
  23. self::ORDER_BATCH => '订单批量支付',
  24. self::ORDER_UNITE_BATCH => '订单混合批量支付', // 余额 + 第三方支付
  25. self::RECHARGE => '充值',
  26. ];
  27. }
  28. /**
  29. * @return array
  30. */
  31. public static function getOrderDetailMap(): array
  32. {
  33. return [
  34. self::ORDER => '订单支付',
  35. self::ORDER_UNITE => '订单混合支付', // 余额 + 第三方支付
  36. self::ORDER_BATCH => '订单支付',
  37. self::ORDER_UNITE_BATCH => '订单混合支付', // 余额 + 第三方支付
  38. ];
  39. }
  40. /**
  41. * @param $key
  42. * @return string
  43. */
  44. public static function getOrderDetailValue($key): string
  45. {
  46. return static::getOrderDetailMap()[$key] ?? '';
  47. }
  48. }
粤ICP备19079148号