商品分类接口修改

This commit is contained in:
zhh
2018-05-22 16:08:45 +08:00
parent aba49c58cb
commit 96fc15e003
3 changed files with 16 additions and 1 deletions

View File

@@ -65,8 +65,16 @@ public class PmsProductCategoryController {
return new CommonResult().pageSuccess(productCategoryList);
}
@ApiOperation("根据id获取商品分类")
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody
public Object getItem(@PathVariable Long id) {
PmsProductCategory productCategory = productCategoryService.getItem(id);
return new CommonResult().success(productCategory);
}
@ApiOperation("删除商品分类")
@RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
@RequestMapping(value = "/delete/{id}", method = RequestMethod.GET)
@ResponseBody
public Object delete(@PathVariable Long id) {
int count = productCategoryService.delete(id);