对比新文件 |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.basic.pojo.ProductPart; |
| | | import com.ruoyi.basic.service.ProductPartService; |
| | | 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; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/productPart") |
| | | @Api(tags = "浜у搧闆朵欢缁戝畾") |
| | | public class ProductPartController { |
| | | |
| | | private ProductPartService productPartService; |
| | | |
| | | @ApiOperation(value = "鏍规嵁浜у搧id鏌ヨ闆朵欢") |
| | | @PostMapping("/selectByProductId") |
| | | public Result selectByProductId(Page page,ProductPart productPart){ |
| | | return Result.success(productPartService.selectByProductId(page,productPart)); |
| | | } |
| | | |
| | | @ApiOperation(value = "鏂板浜у搧闆朵欢") |
| | | @PostMapping("/addProductPart") |
| | | public Result addProductPart(@RequestBody ProductPart productPart) { |
| | | productPartService.addProductPart(productPart); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "鏇存柊浜у搧闆朵欢") |
| | | @PostMapping("/updateProductPart") |
| | | public Result updateProductPart(@RequestBody ProductPart productPart) { |
| | | productPartService.updateProductPartById(productPart); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "鍒犻櫎浜у搧闆朵欢") |
| | | @PostMapping("/deleteProductPart") |
| | | public Result deleteProductPart(Integer id) { |
| | | productPartService.removeById(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | } |