From 47be88a9b16c2c58b480b29d8b8c583731c79d60 Mon Sep 17 00:00:00 2001 From: Hentua <wangdoubleone@gmail.com> Date: Wed, 24 Jan 2024 18:43:32 +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