浏览代码

no message

FengChaoYu 2 周之前
父节点
当前提交
22b31953bc
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      mall-server-api/src/main/java/com/gree/mall/manager/logic/goods/GoodsLogic.java

+ 1 - 1
mall-server-api/src/main/java/com/gree/mall/manager/logic/goods/GoodsLogic.java

@@ -210,7 +210,7 @@ public class GoodsLogic {
      */
      */
     public GoodsSpecBean detail(String goodsId, Boolean allStorageSpec) throws RemoteServiceException {
     public GoodsSpecBean detail(String goodsId, Boolean allStorageSpec) throws RemoteServiceException {
         Goods goods = goodsService.getById(goodsId);
         Goods goods = goodsService.getById(goodsId);
-        final GoodsDetail goodsDetail = goodsDetailService.getById(goodsId);
+        final GoodsDetail goodsDetail = !allStorageSpec ? goodsDetailService.getById(goodsId) : null;
         List<GoodsSpec> goodsSpecs = goodsSpecService.lambdaQuery()
         List<GoodsSpec> goodsSpecs = goodsSpecService.lambdaQuery()
                 .eq(GoodsSpec::getGoodsId, goodsId)
                 .eq(GoodsSpec::getGoodsId, goodsId)
                 .eq(GoodsSpec::getDel, false)
                 .eq(GoodsSpec::getDel, false)