| | |
| | | |
| | | |
| | | @ApiOperation("根据productId查询") |
| | | @GetMapping("listByProductId") |
| | | public R listByProductId( Long productId){ |
| | | return R.ok(productStructureService.listByProductId( productId)); |
| | | @GetMapping("listByproductModelId") |
| | | public R listByproductModelId( Long productModelId){ |
| | | return R.ok(productStructureService.listByproductModelId( productModelId)); |
| | | } |
| | | |
| | | @ApiOperation("新增产品结构") |
| | | @PostMapping() |
| | | public R add(ProductStructure productStructure){ |
| | | public R add(@RequestBody ProductStructure productStructure){ |
| | | return R.ok(productStructureService.save(productStructure)); |
| | | } |
| | | |
| | | @ApiOperation("修改产品结构") |
| | | @PutMapping() |
| | | public R update(ProductStructure productStructure){ |
| | | public R update(@RequestBody ProductStructure productStructure){ |
| | | return R.ok(productStructureService.updateById(productStructure)); |
| | | } |
| | | |