$product_id, 'category_id' => $item, 'app_id' => self::$app_id, ]; } count($data) > 0 && $model->saveAll($data); } /** * 移除指定商品的所有分类 */ public function removeAll($product_id) { $model = new self; return $model->where('product_id','=', $product_id)->delete(); } }