| | |
| | | |
| | | |
| | | @ApiOperation("根据productId查询") |
| | | @GetMapping("listByproductModelId") |
| | | public R listByproductModelId( Long productModelId){ |
| | | @GetMapping("listByproductModelId/{productModelId}") |
| | | public R listByproductModelId( @PathVariable("productModelId") Long productModelId){ |
| | | return R.ok(productStructureService.listByproductModelId( productModelId)); |
| | | } |
| | | |
| | | @ApiOperation("新增产品结构") |
| | | @PostMapping() |
| | | public R add(@RequestBody ProductStructure productStructure){ |
| | | return R.ok(productStructureService.save(productStructure)); |
| | | public R addOrUpdate(@RequestBody ProductStructureDto productStructureDto){ |
| | | return R.ok(productStructureService.addProductStructureDto(productStructureDto)); |
| | | } |
| | | |
| | | @ApiOperation("修改产品结构") |
| | | @PutMapping() |
| | | public R update(@RequestBody ProductStructure productStructure){ |
| | | return R.ok(productStructureService.updateById(productStructure)); |
| | | } |
| | | |
| | | @ApiOperation("删除产品结构") |
| | | @DeleteMapping("/{ids}") |
| | | public R delete(@PathVariable("ids") Long[] ids){ |