find($category_id); } /** * 所有分类 */ public static function getALL() { $model = new static; $data = $model->order(['sort' => 'asc', 'create_time' => 'asc'])->select(); return $data; } public function getListByIds($ids) { return $this->field(['category_id', 'name'])->where('category_id', 'in', $ids)->select(); } }