From 11c5ab8d97809bdeddb60b22a4fe161a67aa3b05 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期一, 19 一月 2026 16:03:17 +0800
Subject: [PATCH] 小程序   接口开发

---
 server/dmmall_service/src/main/java/com/doumee/dao/business/GoodsMapper.java |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/server/dmmall_service/src/main/java/com/doumee/dao/business/GoodsMapper.java b/server/dmmall_service/src/main/java/com/doumee/dao/business/GoodsMapper.java
index 2a54f92..3fc71c4 100644
--- a/server/dmmall_service/src/main/java/com/doumee/dao/business/GoodsMapper.java
+++ b/server/dmmall_service/src/main/java/com/doumee/dao/business/GoodsMapper.java
@@ -34,4 +34,13 @@
             "  where g.ISDELETED = 0 and g.id = #{id} ")
     GoodsInfoResponse getGoodsInfo(@Param("id") Integer id);
 
+
+    @Select(" select g.* , gs.price as minPrice " +
+            " ifnull( ( select   sgr.PRICE from shop_goods_relation sgr where sgr.GOODS_SKU_ID = gs.ID and sgr.ISDELETED = 0 and sgr.`STATUS` = 0  and sgr.SHOP_ID = #{shopId} ) ,0) as exFactoryPrice " +
+            " ifnull(( select sum(gd.NAME) from goodsorder_detail gd  inner join goodsorder go on gd.ORDER_ID = go.id  where gd.GOODS_SKU_ID = gs.`id` and  go.DISTRIBUTION_SHOP_ID = 1 ),0) as realSaleNum " +
+            " from goods g left join goods_sku gs on g.id = gs.GOODS_ID " +
+            " ${ew.customSqlSegment} ")
+    IPage<GoodsInfoResponse> goodsPageForShop(IPage<GoodsRequest> page, @Param(Constants.WRAPPER) Wrapper wrapper,@Param("shopId") Integer shopId);
+
+
 }

--
Gitblit v1.9.3