OrderEnum.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. namespace app\common\Enum;
  3. class OrderEnum
  4. {
  5. /**
  6. * 订单状态
  7. */
  8. const STATUS_CREATE = 101; //待付款
  9. const STATUS_PAY = 201; //已付款
  10. const STATUS_SHIP = 301; //已发货
  11. const STATUS_CONFIRM = 401; //已收货
  12. const STATUS_AUTO_CONFIRM = 402;
  13. const STATUS_CANCEL = 102;
  14. const STATUS_AUTO_CANCEL = 103;
  15. const STATUS_ADMIN_CANCEL = 104;
  16. const STATUS_REFUND = 202;
  17. const STATUS_REFUND_CONFIRM = 203;
  18. const STATUS_GROUPON_TIMEOUT = 204;
  19. /**
  20. * 订单枚举map
  21. */
  22. const STATUS_TEXT_MAP = [
  23. self::STATUS_CREATE => '未付款',
  24. self::STATUS_CANCEL => "已取消",
  25. self::STATUS_AUTO_CANCEL => "已取消(系统)",
  26. self::STATUS_ADMIN_CANCEL => "已取消(管理员)",
  27. self::STATUS_PAY => "已付款",
  28. self::STATUS_REFUND => "订单取消,退款中",
  29. self::STATUS_REFUND_CONFIRM => "已退款",
  30. self::STATUS_GROUPON_TIMEOUT => "已超时团购",
  31. self::STATUS_SHIP => "已发货",
  32. self::STATUS_CONFIRM => "已收货",
  33. self::STATUS_AUTO_CONFIRM => "已收货(系统)",
  34. ];
  35. const SHOW_TYPE_ALL = 0;//全部订单
  36. const SHOW_TYPE_WAIT_PAY = 1;//待付款订单
  37. const SHOW_TYPE_WAIT_DELIVERY = 2;//待发货订单
  38. const SHOW_TYPE_WAIT_RECEIPT = 3;//待收货订单
  39. const SHOW_TYPE_WAIT_COMMENT = 4;//待评价订单
  40. /**
  41. * 订单枚举map
  42. */
  43. const SHOW_TYPE_STATUS_MAP = [
  44. self::SHOW_TYPE_ALL => [],
  45. self::SHOW_TYPE_WAIT_PAY => [self::STATUS_CREATE],
  46. self::SHOW_TYPE_WAIT_DELIVERY => [self::STATUS_PAY],
  47. self::SHOW_TYPE_WAIT_RECEIPT => [self::STATUS_SHIP],
  48. self::SHOW_TYPE_WAIT_COMMENT => [self::STATUS_CONFIRM, self::STATUS_COMMENT],
  49. ];
  50. /**
  51. * 支付方式 枚举
  52. */
  53. const METHOD_WALLET = 'wallet';
  54. const METHOD_WECHAT = 'wechatv3';
  55. /**
  56. * 支付方式
  57. */
  58. const SHOW_PAY_TYPE_MAP = [
  59. self::METHOD_WALLET => '余额支付',
  60. self::METHOD_WECHAT => '微信支付',
  61. ];
  62. }