fix:物模型型号配置添加删除接口
parent
eb5c8c2872
commit
0994c7f1c9
|
@ -144,4 +144,10 @@ public class ProductController {
|
|||
public boolean saveProductModel(@Validated @RequestBody Request<ProductModelBo> bo) {
|
||||
return productService.editProductModel(bo.getData());
|
||||
}
|
||||
|
||||
@PostMapping("/productModel/delete")
|
||||
@ApiOperation("删除产品型号")
|
||||
public boolean deleteProductModel(@Validated @RequestBody Request<String> id) {
|
||||
return productService.deleteProductModel(id.getData());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,4 +48,6 @@ public interface IProductService {
|
|||
List<ProductModelVo> getModels(String productKey);
|
||||
|
||||
boolean editProductModel(ProductModelBo productModel);
|
||||
|
||||
boolean deleteProductModel(String id);
|
||||
}
|
||||
|
|
|
@ -199,6 +199,12 @@ public class ProductServiceImpl implements IProductService {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteProductModel(String id) {
|
||||
productModelData.deleteById(id);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean editProductModel(ProductModelBo productModelBo) {
|
||||
ProductModel productModel = productModelBo.to(ProductModel.class);
|
||||
|
|
Loading…
Reference in New Issue