Commit d4fb078b authored by luhongguang's avatar luhongguang

update:商品一级分类接口

parent 195373bf
......@@ -28,6 +28,16 @@ class GoodsController extends Base
$this->success(["result" => $categoryList]);
}
/**
* 一级商品分类数据
* @throws Exception
*/
public function get_level_one_category_listAction()
{
$categoryList = CategoryService::getLevelOneCategory();
$this->success(["result" => $categoryList]);
}
/**
* 增加商品
*/
......
......@@ -46,4 +46,13 @@ class CategoryService
}
return $data;
}
/**
* 查询一级商品分类
* @return \Api\PhpUtils\Mysql\MysqlBase
*/
public static function getLevelOneCategory()
{
return Category::getRecordList(["level"=>Category::LEVEL_1], ['category_id', 'name']);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment