select(); if(!$goods->isEmpty()){ foreach ($goods as $item){ $temp = GoodTax::getInfobySpuCode($item->childCode,$order_type); if(empty($temp)) continue; $result[]=$temp; } } } $temp = GoodTax::getInfobySpuCode($spuCode,$order_type); if(empty($temp)) return $result; $result[]=$temp; return $result; } }