From 31253884dc6cb8e30a94e04de63308ccd626372c Mon Sep 17 00:00:00 2001 From: Tankaikai Date: Sat, 12 Apr 2025 17:39:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E4=BF=AE=E6=94=B9=E4=BD=86?= =?UTF-8?q?=E5=A4=9A=E8=A7=84=E6=A0=BC=E5=88=87=E6=8D=A2=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=97=B6=E6=B8=85=E7=A9=BAspecId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../czg/service/product/service/impl/ProductServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ProductServiceImpl.java b/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ProductServiceImpl.java index 6bd05d67..be83bf13 100644 --- a/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ProductServiceImpl.java +++ b/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ProductServiceImpl.java @@ -307,6 +307,10 @@ public class ProductServiceImpl extends ServiceImpl impl } entity.setIsDel(DeleteEnum.NORMAL.value()); entity.setShopId(shopId); + if(!ProductTypeEnum.SKU.value().equals(entity.getType())){ + entity.setSpecId(null); + } + entity.setSpecId(null); super.updateById(entity); List skuList = dto.getSkuList(); // 商品SKU-ID列表 @@ -429,6 +433,7 @@ public class ProductServiceImpl extends ServiceImpl impl .eq(Product::getShopId, shopId) .update(); prodGroupRelationMapper.deleteByQuery(query().eq(ProdGroupRelation::getProductId, id)); + prodConsRelationMapper.deleteByQuery(query().eq(ProdConsRelation::getProductId, id)); } @Override