From 35d9f56433057ea286ca19c5a6ffd40a303c500c Mon Sep 17 00:00:00 2001 From: dy-hu Date: Wed, 21 Aug 2024 09:59:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81=E8=B4=AD=E4=B9=B0=E4=BA=BA?= =?UTF-8?q?=E6=95=B0=E7=A9=BA=E6=8C=87=E9=92=88=E5=BC=82=E5=B8=B8=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cereshop/app/service/product/impl/CereShopProductServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/product/impl/CereShopProductServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/product/impl/CereShopProductServiceImpl.java index 7d1e7d9..2f096ae 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/product/impl/CereShopProductServiceImpl.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/product/impl/CereShopProductServiceImpl.java @@ -1030,7 +1030,9 @@ public class CereShopProductServiceImpl implements CereShopProductService { Long productId = product.getProductId(); if(!usersMapIsEmpty){ //填充产品购买人数信息 - product.setUsers(productUsersMap.get(productId).getUsers()); + if (ObjectUtils.isNotEmpty(productUsersMap.get(productId))){ + product.setUsers(productUsersMap.get(productId).getUsers()); + } } if(!skuMapIsEmpty){ //填充产品sku信息