新版
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.peanut.modules.book.controller;
|
||||
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.book.entity.ShopProductLabelEntity;
|
||||
import com.peanut.modules.book.service.ShopProductLabelService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("book/label")
|
||||
public class ShopProductLabelController {
|
||||
|
||||
@Autowired
|
||||
private ShopProductLabelService shopProductLabelService;
|
||||
|
||||
|
||||
@RequestMapping("/addLabel")
|
||||
public R addLabel(@RequestParam String labelName){
|
||||
ShopProductLabelEntity shopProductLabelEntity = new ShopProductLabelEntity();
|
||||
shopProductLabelEntity.setLabelName(labelName);
|
||||
shopProductLabelService.save(shopProductLabelEntity);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user