This commit is contained in:
quyixiao 2025-10-26 23:07:26 +08:00
parent 98ddbf5de3
commit 9237b68fea

View File

@ -228,9 +228,8 @@ public class AdminProductController {
@RequestMapping("/insertOrUpadate")
public R insertOrUpadate(@RequestBody VvProductDTO vvProductDTO) {
Long productId = vvProductDTO.getId() == null ? -1L : vvProductDTO.getId();
vvProductDao.insertOrUpdateVvProduct(vvProductDTO);
productId = vvProductDTO.getId();
Long productId = vvProductDTO.getId();
List<VvProductDetailEntity> productDetailEntities = vvProductDetailDao.selectVvProductDetailByProductId(productId);
// 1. 如果传过来的参数存在则更新 如果不存在 则直接物理删除掉
for (VvProductDetailEntity productDetailEntity : productDetailEntities) {