From 5feb2085f70f764d2a44dff707a3f57fa5fb306f Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期三, 19 六月 2024 15:27:00 +0800 Subject: [PATCH] bug修改 --- ruoyi-service/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/TGoodsController.java | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/ruoyi-service/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/TGoodsController.java b/ruoyi-service/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/TGoodsController.java index 325b9b5..e3f085a 100644 --- a/ruoyi-service/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/TGoodsController.java +++ b/ruoyi-service/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/TGoodsController.java @@ -669,7 +669,11 @@ // 商品分类详情 List<TGoodsType> goodsTypes = goodsTypeService.lambdaQuery().in(TGoodsType::getId, Arrays.asList(goods.getTypeIds().split(","))).list(); // 已兑换人数 - int number = goods.getBasicCount() + orderService.getGoodBuyNumber(goods.getId()); + int number = 0; + if (null != goods.getBasicCount()) { + number += goods.getBasicCount(); + } + number += orderService.getGoodBuyNumber(goods.getId()); return R.ok(new GoodDetailVO(goods, goodsTypes, number)); } -- Gitblit v1.7.1