|
@@ -24,6 +24,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
@@ -50,7 +51,7 @@ public class GoodsController extends BaseController {
|
|
|
@ApiOperation(value = "新增商品(教材、辅件)")
|
|
|
@PostMapping("/add")
|
|
|
@PreAuthorize("@pcs.hasPermissions('goods/add')")
|
|
|
- public Object add(GoodsWrapper.Goods goods){
|
|
|
+ public Object add(@RequestBody GoodsWrapper.Goods goods){
|
|
|
goodsService.addGoods(goods,sysUserService.getUserId());
|
|
|
return succeed();
|
|
|
}
|
|
@@ -89,7 +90,7 @@ public class GoodsController extends BaseController {
|
|
|
@ApiOperation(value = "修改商品(教材、辅件)")
|
|
|
@PostMapping("/update")
|
|
|
@PreAuthorize("@pcs.hasPermissions('goods/update')")
|
|
|
- public Object update(GoodsWrapper.Goods goods){
|
|
|
+ public Object update(@RequestBody GoodsWrapper.Goods goods){
|
|
|
goods.setUpdateTime(new Date());
|
|
|
goodsService.updateGoods(goods);
|
|
|
return succeed();
|