|
@@ -4,6 +4,7 @@ import javax.validation.Valid;
|
|
|
import javax.validation.constraints.Min;
|
|
|
|
|
|
import com.chelvc.cloud.vehicle.api.dto.CategoryDTO;
|
|
|
+import com.chelvc.cloud.vehicle.api.param.CategoryListParam;
|
|
|
import com.chelvc.cloud.vehicle.api.param.CategoryModifyParam;
|
|
|
import com.chelvc.cloud.vehicle.api.param.CategoryPagingParam;
|
|
|
import com.chelvc.cloud.vehicle.api.service.CategoryService;
|
|
@@ -84,9 +85,9 @@ public class CategoryController {
|
|
|
*
|
|
|
* @return 分类信息列表
|
|
|
*/
|
|
|
- @GetMapping("/categories")
|
|
|
- public List<CategoryDTO> listCategories() {
|
|
|
- return this.categoryService.listActiveCategories();
|
|
|
+ @PostMapping("/categories")
|
|
|
+ public List<CategoryDTO> listCategories(@RequestBody @Valid CategoryListParam param) {
|
|
|
+ return this.categoryService.listActiveCategories(param);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -94,8 +95,8 @@ public class CategoryController {
|
|
|
*
|
|
|
* @return 分类信息列表
|
|
|
*/
|
|
|
- @GetMapping("/getRootCategories")
|
|
|
- public List<CategoryDTO> getRootCategories() {
|
|
|
- return this.categoryService.getRootCategories();
|
|
|
+ @PostMapping("/getRootCategories")
|
|
|
+ public List<CategoryDTO> getRootCategories(@RequestBody @Valid CategoryListParam param) {
|
|
|
+ return this.categoryService.getRootCategories(param);
|
|
|
}
|
|
|
}
|