From 19df67e19f23cd2a04d1c7f355e1e656f4140af4 Mon Sep 17 00:00:00 2001 From: huliguo <2023611923@qq.com> Date: 星期四, 17 四月 2025 20:04:14 +0800 Subject: [PATCH] 后台:首页统计、系统管理、广告管理、用户管理、商品分类管理 --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java index 12e5e1e..5035619 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java @@ -39,6 +39,7 @@ import java.time.LocalDateTime; import java.time.ZoneId; import java.util.*; +import java.util.function.Function; import java.util.stream.Collectors; /** @@ -232,6 +233,7 @@ //已售数量 Integer integer = orderClient.getGoodsSaleNum(goods.getId(), 1).getData(); goodsVO.setSaleNum(integer); + return goodsVO; } @@ -241,6 +243,9 @@ public List<GoodsVO> getGoodsListByShopId(PageInfo<GoodsVO> pageInfo, Integer shopId) { //查询该门店商品 List<GoodsVO> goods = goodsMapper.selectListByShopId(pageInfo, shopId); + if (goods == null) { + return null; + } for (GoodsVO good : goods) { //价格 Price price = getPrice( good.getGoodsId()); -- Gitblit v1.7.1