From 1bff7bcb0c0f5471033942a74c88cb00f60960e3 Mon Sep 17 00:00:00 2001
From: Hentua <wangdoubleone@gmail.com>
Date: Wed, 24 Jan 2024 19:19:50 +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