You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
honor-dd-light-ds-java/doc/move/const/class.ProductStatusConst.php

89 lines
1.5 KiB
PHP

<?php
/**
* 抖店的商品状态常量
*/
class ProductStatusConst {
/**
* 上架产品
*/
const onSale = 0;
/**
* 非上架产品
* 自定义的状态,包含了非上架的所有状态
*/
const unOnSale = 99;
/**
* 下架产品
*/
const forSale = 1;
/**
* 删除(回收站)
*/
const recycleBin = 2;
/**
* 彻底删除
*/
const delete = -2;
/*
* 审核状态 通过(即上架)
*/
const checkSuccess = 3;
/*
* 审核状态 封禁
*/
const checkBlocked = 5;
/*
* 审核状态 草稿箱
*/
const checkDrafts = 1;
/*
* 审核状态 审核中
*/
const checkIng = 2;
const itemInputTypeSelect = 'select';
const itemInputTypeInput = 'input';
const itemInputTypeText = 'text';
const itemInputTypeCheckBox = 'checkbox';
const itemInputTypeRadio = 'radio';
/*
* 审核状态 审核失败
*/
const checkFail = 4;
const productShortHasSet = 'productShortHasSet';
const productShortNotSet = 'productShortNotSet';
const skuShortHasSet = 'skuShortHasSet';
const skuShortNotSet = 'skuShortNotSet';
public static function getProductStatusName($itemStatus)
{
$nameMap = array(
self::onSale => '上架',
self::forSale => '下架',
self::recycleBin => '删除至回收站',
self::delete => '彻底删除',
);
return $nameMap[$itemStatus] ? $nameMap[$itemStatus] : $itemStatus;
}
}