| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | 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; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | |
| | | private ProductPartService productPartService; |
| | | |
| | | @ApiOperation(value = "根据产品id查询零件") |
| | | @PostMapping("/selectByProductId") |
| | | @GetMapping("/selectByProductId") |
| | | public Result selectByProductId(Page page,ProductPart productPart){ |
| | | return Result.success(productPartService.selectByProductId(page,productPart)); |
| | | } |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "删除产品零件") |
| | | @PostMapping("/deleteProductPart") |
| | | @DeleteMapping("/deleteProductPart") |
| | | public Result deleteProductPart(Integer id) { |
| | | productPartService.removeById(id); |
| | | return Result.success(); |