123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- <?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- namespace app\common\enum;
-
- class LiveGoodsEnum
- {
-
- const SOURCE_TYPE_GOODS = 0;
- const SOURCE_TYPE_SELF = 1;
-
-
-
- const SYS_AUDIT_STATUS_WAIT_PLATFORM = 0;
- const SYS_AUDIT_STATUS_WAIT_WECHAT = 1;
- const SYS_AUDIT_STATUS_SUCCESS = 2;
- const SYS_AUDIT_STATUS_FAIL = 3;
-
-
-
- const WX_AUDIT_STATUS_WAIT = 0;
- const WX_AUDIT_STATUS_ING = 1;
- const WX_AUDIT_STATUS_SUCCESS = 2;
- const WX_AUDIT_STATUS_FAIL = 3;
-
-
-
- const PRICE_ONE = 1;
- const PRICE_RANGE = 2;
- const PRICE_DISCOUNT = 3;
-
-
-
-
- public static function getAuditStatusDesc($from = true)
- {
- $desc = [
- self::SYS_AUDIT_STATUS_WAIT_PLATFORM => '待平台审核',
- self::SYS_AUDIT_STATUS_WAIT_WECHAT => '待微信审核',
- self::SYS_AUDIT_STATUS_SUCCESS => '审核通过',
- self::SYS_AUDIT_STATUS_FAIL => '审核未通过',
- ];
- if (true === $from) {
- return $desc;
- }
- return $desc[$from] ?? '未知';
- }
-
-
-
-
- public static function getPriceTypeDesc($from = true)
- {
- $desc = [
- self::PRICE_ONE => '一口价',
- self::PRICE_RANGE => '价格区间',
- self::PRICE_DISCOUNT => '显示价格',
- ];
- if (true === $from) {
- return $desc;
- }
- return $desc[$from] ?? '未知';
- }
-
-
-
-
- public static function getSourceTypeDesc($from = true)
- {
- $desc = [
- self::SOURCE_TYPE_GOODS => '商品库',
- self::SOURCE_TYPE_SELF => '自定义',
- ];
- if (true === $from) {
- return $desc;
- }
- return $desc[$from] ?? '未知';
- }
-
-
-
-
- public static function getWxAuditStatusDesc($from = true)
- {
- $desc = [
- self::WX_AUDIT_STATUS_WAIT => '微信未审核',
- self::WX_AUDIT_STATUS_ING => '微信审核中',
- self::WX_AUDIT_STATUS_SUCCESS => '微信审核通过',
- self::WX_AUDIT_STATUS_FAIL => '微信审核失败',
- ];
- if (true === $from) {
- return $desc;
- }
- return $desc[$from] ?? '';
- }
-
- }
|