|
@@ -49,4 +49,25 @@ public class CategoryController {
|
|
|
public List<CategoryDTO> getCategories(@RequestBody @Valid CategoryListParam param) {
|
|
|
return this.categoryClient.getRootCategories(param);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取分类列表
|
|
|
+ *
|
|
|
+ * @return 分类信息列表
|
|
|
+ */
|
|
|
+ @PostMapping("/getRootCategories")
|
|
|
+ public List<CategoryDTO> getRootCategories(@RequestBody @Valid CategoryListParam param) {
|
|
|
+ return this.categoryClient.getRootCategories(param);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取一级分类列表
|
|
|
+ *
|
|
|
+ * @return 分类信息列表
|
|
|
+ */
|
|
|
+ @PostMapping("/getParentCategories")
|
|
|
+ public List<CategoryDTO> getParentCategories(@RequestBody @Valid CategoryListParam param) {
|
|
|
+ return this.categoryClient.getParentCategories(param);
|
|
|
+ }
|
|
|
}
|