From a371d5a31e0087cfd9a5383b646689eec23ee367 Mon Sep 17 00:00:00 2001 From: Hentua <wangdoubleone@gmail.com> Date: Wed, 24 Jan 2024 18:33:03 +0800 Subject: [PATCH] fix --- src/main/resources/mapper/modules/MallGoodsMapper.xml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/main/resources/mapper/modules/MallGoodsMapper.xml b/src/main/resources/mapper/modules/MallGoodsMapper.xml index 20c4977..817bacb 100644 --- a/src/main/resources/mapper/modules/MallGoodsMapper.xml +++ b/src/main/resources/mapper/modules/MallGoodsMapper.xml @@ -106,7 +106,7 @@ </if> min(b.id) skuId, min(b.present_price) price, - sum(b.stock) stock, + ifnull(sum(b.stock), a.stock) stock, sum(b.sku_volume) saleVolume from mall_goods a left join mall_goods_sku b on a.id=b.goods_id -- Gitblit v1.9.1