IntegralDeliveryEnum.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | likeshop100%开源免费商用商城系统
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | 开源版本可自由商用,可去除界面版权logo
  7. // | 商业版本务必购买商业授权,以免引起法律纠纷
  8. // | 禁止对系统程序代码以任何目的,任何形式的再发布
  9. // | gitee下载:https://gitee.com/likeshop_gitee
  10. // | github下载:https://github.com/likeshop-github
  11. // | 访问官网:https://www.likeshop.cn
  12. // | 访问社区:https://home.likeshop.cn
  13. // | 访问手册:http://doc.likeshop.cn
  14. // | 微信公众号:likeshop技术社区
  15. // | likeshop团队 版权所有 拥有最终解释权
  16. // +----------------------------------------------------------------------
  17. // | author: likeshopTeam
  18. // +----------------------------------------------------------------------
  19. namespace app\common\enum;
  20. class IntegralDeliveryEnum
  21. {
  22. /**
  23. * 配送状态
  24. * NOT_SHIPPED 未发货
  25. * SHIPPED 已发货
  26. */
  27. const NOT_SHIPPED = 0;
  28. const SHIPPED = 1;
  29. /**
  30. * 发货方式
  31. * EXPRESS 快递配送
  32. * NO_EXPRESS 无需快递
  33. */
  34. const EXPRESS = 1;//快递配送
  35. const NO_EXPRESS = 2;//无需快递
  36. public static function getDeliveryStatusDesc($value = true)
  37. {
  38. $data = [
  39. self::NOT_SHIPPED => '未发货',
  40. self::SHIPPED => '已发货',
  41. ];
  42. if (true === $value) {
  43. return $data;
  44. }
  45. return $data[$value];
  46. }
  47. /**
  48. * @notes 配送方式
  49. * @param bool $value
  50. * @return string|string[]
  51. * @author 段誉
  52. * @date 2022/4/1 14:31
  53. */
  54. public static function getSendTypeDesc($value = true)
  55. {
  56. $data = [
  57. self::EXPRESS => '快递配送',
  58. self::NO_EXPRESS => '无需快递',
  59. ];
  60. if (true === $value) {
  61. return $data;
  62. }
  63. return $data[$value];
  64. }
  65. }