|
@@ -85,10 +85,14 @@ public class ProductCategoryController {
|
|
|
|
|
|
@Operation(summary = "删除产品类别")
|
|
@Operation(summary = "删除产品类别")
|
|
@PostMapping("/deleteProductCategory")
|
|
@PostMapping("/deleteProductCategory")
|
|
- public String deleteProductCategory(@RequestBody List<Integer> ids) throws Exception {
|
|
|
|
|
|
+ public Response deleteProductCategory(@RequestBody List<Integer> ids) throws Exception {
|
|
Business business = businessFactory.getClass("productCategoryService");
|
|
Business business = businessFactory.getClass("productCategoryService");
|
|
- business.deleteMessage(ids);
|
|
|
|
- return Response.success();
|
|
|
|
|
|
+ try {
|
|
|
|
+ business.deleteMessage(ids);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ return Response.error(e.getMessage());
|
|
|
|
+ }
|
|
|
|
+ return Response.success(1);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|