objProductHotModel = new ProductHotModel(); } public function getProductHot(array $product_id_array) { $hot_script = $this->objProductHotModel->getProductHot($product_id_array); //add empty for other products foreach ($product_id_array as $pro_id) { if(!isset($hot_script[$pro_id])) $hot_script[$pro_id] = []; } return $hot_script; } public function updateProductHot($pro_id, array $new_types) { return $this->objProductHotModel->updateProductHot($pro_id, $new_types); } }