Browse Source

产品购买人数空指针异常处理

multiwx
dy-hu 5 months ago
parent
commit
35d9f56433
  1. 4
      cereshop-app/src/main/java/com/shop/cereshop/app/service/product/impl/CereShopProductServiceImpl.java

4
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信息

Loading…
Cancel
Save