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