1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- namespace app\common\enum;
-
-
- class IntegralOrderEnum
- {
-
- const ORDER_STATUS_NO_PAID = 0;
- const ORDER_STATUS_DELIVERY = 1;
- const ORDER_STATUS_GOODS = 2;
- const ORDER_STATUS_COMPLETE = 3;
- const ORDER_STATUS_DOWN = 4;
-
-
- const NO_REFUND = 0;
- const IS_REFUND = 1;
-
-
- const SHIPPING_NO = 0;
- const SHIPPING_FINISH = 1;
-
-
-
-
- public static function getOrderStatus($type=true)
- {
- $desc = [
- self::ORDER_STATUS_NO_PAID => '待支付',
- self::ORDER_STATUS_DELIVERY => '待发货',
- self::ORDER_STATUS_GOODS => '待收货',
- self::ORDER_STATUS_COMPLETE => '已完成',
- self::ORDER_STATUS_DOWN => '已关闭'
- ];
-
- if ($type === true) {
- return $desc;
- }
- return $desc[$type] ?? '未知来源';
- }
-
-
-
-
- public static function getRefundStatus($type=true)
- {
- $desc = [
- self::NO_REFUND => '未退款',
- self::IS_REFUND => '已退款',
- ];
-
- if ($type === true) {
- return $desc;
- }
- return $desc[$type] ?? '--';
- }
- }
|