['code' => 'TB', 'name' => '淘宝'], 'Jingdong' => ['code' => 'JD', 'name' => '京东'], 'Pdd' => ['code' => 'PDD', 'name' => '拼多多'], 'Suning' => ['code' => 'SN', 'name' => '苏宁'], 'Vipshop' => ['code' => 'VPH', 'name' => '唯品会'], 'Douyin' => ['code' => 'DY', 'name' => '抖音'] ]; /** * @param $type * @return mixed */ public static function platformCodeMapByThirdPartyGoodEnumTypeCode($type) { $map = [ 5 => self::PLATFORM['Taobao']['code'], 6 => self::PLATFORM['Jingdong']['code'], 1 => self::PLATFORM['Pdd']['code'], 3 => self::PLATFORM['Suning']['code'], 2 => self::PLATFORM['Vipshop']['code'], ]; return $map[$type]; } }