From 0e7475d894ca291f969466215648c65be260f50d Mon Sep 17 00:00:00 2001 From: Tankaikai Date: Fri, 21 Feb 2025 14:09:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E6=A8=A1=E5=9D=97=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/product/service/impl/ProductServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 d4e41b7d..9f999399 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 @@ -211,7 +211,7 @@ public class ProductServiceImpl extends ServiceImpl impl } entity.setIsDel(DeleteEnum.NORMAL.value()); entity.setShopId(shopId); - super.save(entity); + super.updateById(entity); List skuList = dto.getSkuList(); // 商品SKU-ID列表 List skuIdList = prodSkuMapper.selectListByQueryAs(query().select(ProdSku::getId).eq(ProdSku::getProductId, dto.getId()), Long.class); @@ -238,8 +238,8 @@ public class ProductServiceImpl extends ServiceImpl impl // 逻辑删除无用的SKU数据 UpdateChain.of(ProdSku.class) .set(ProdSku::getIsDel, DeleteEnum.DELETED.value()) - .in(Product::getId, skuIdList) - .eq(Product::getShopId, shopId) + .in(ProdSku::getId, skuIdList) + .eq(ProdSku::getShopId, shopId) .update(); return true; }