'全场通用', self::USE_GOODS_TYPE_ALLOW => '指定商品可用', self::USE_GOODS_TYPE_BAN => '指定商品不可用', self::USE_GOODS_TYPE_CATEGORY => '指定分类可用', ]; if ($value === true) { return $data; } return $data[$value]; } /** * @notes 领取方式 * @param bool $value * @return array|mixed * @author 张无忌 * @date 2021/7/20 17:36 */ public static function getTypeDesc($value = true) { $data = [ self::GET_TYPE_USER => '买家领取', self::GET_TYPE_STORE => '卖家发放' ]; if ($value === true) { return $data; } return $data[$value]; } /** * @notes 优惠券状态 * @param bool $value * @return array|mixed * @author 张无忌 * @date 2021/7/20 17:55 */ public static function getCouponStatusDesc($value = true) { $data = [ self::COUPON_STATUS_NOT => '未开始', self::COUPON_STATUS_CONDUCT => '进行中', self::COUPON_STATUS_END => '已结束' ]; if ($value === true) { return $data; } return $data[$value]; } /** * @notes 优惠券使用状态 * @param bool $value * @return array|mixed * @author 张无忌 * @date 2021/7/21 17:03 */ public static function getUseStatusDesc($value = true) { $data = [ self::USE_STATUS_NOT => '未使用', self::USE_STATUS_OK => '已使用', self::USE_STATUS_EXPIRE => '已过期', self::USE_STATUS_VOID => '已作废' ]; if ($value === true) { return $data; } return $data[$value]; } }