'单规格', self::SEPC_TYPE_MORE => '多规格', ]; if(true === $from){ return $desc; } return $desc[$from] ?? ''; } /** * @notes 商品状态 * @param bool $from * @return array|mixed|string * @author cjhao * @date 2021/9/10 15:09 */ public static function getStatusDesc($from = true) { $desc = [ self::STATUS_SELL => '销售中', self::STATUS_STORAGE => '仓库中', ]; if(true === $from){ return $desc; } return $desc[$from] ?? ''; } /** * @notes 获取商品类型 * @param bool $from * @return array|mixed|string * @author cjhao * @date 2022/4/19 12:09 */ public static function getGoodsTypeDesc($from = true){ $desc = [ self::GOODS_REALITY => '实物商品', self::GOODS_VIRTUAL => '虚拟商品', ]; if(true === $from){ return $desc; } return $desc[$from] ?? ''; } /** * @notes 采集渠道 * @param bool $from * @return string|string[] * @author ljj * @date 2023/3/14 11:03 上午 */ public static function getGatherChannelDesc($from = true) { $desc = [ self::GATHER_CHANNEL_UNKNOWN => '未知', self::GATHER_CHANNEL_TAOBAO => '淘宝', self::GATHER_CHANNEL_TMALL => '天猫', self::GATHER_CHANNEL_JD => '京东', self::GATHER_CHANNEL_1688 => '阿里巴巴', ]; if(true === $from){ return $desc; } return $desc[$from] ?? ''; } }