|
|
@ -73,6 +73,11 @@ public class GoodsController extends JeecgController<Goods, IGoodsService> {
|
|
|
|
//@RequiresPermissions("erp:goods:add")
|
|
|
|
//@RequiresPermissions("erp:goods:add")
|
|
|
|
@PostMapping(value = "/add")
|
|
|
|
@PostMapping(value = "/add")
|
|
|
|
public Result<String> add(@RequestBody Goods goods) {
|
|
|
|
public Result<String> add(@RequestBody Goods goods) {
|
|
|
|
|
|
|
|
Goods goodsInfo = goodsService.getOne(
|
|
|
|
|
|
|
|
new QueryWrapper<Goods>()
|
|
|
|
|
|
|
|
.select("max(id)")
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
goods.setId(goodsInfo.getId()+1);
|
|
|
|
goodsService.save(goods);
|
|
|
|
goodsService.save(goods);
|
|
|
|
return Result.OK("添加成功!");
|
|
|
|
return Result.OK("添加成功!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|