Commit e0c4e9edf807a565f96340aaa648262acfe074aa

Authored by dengwei
1 parent 2fbb0ddf

fix XTRADE-48 商品库存为0不展示

etrade-shop/src/main/resources/com/diligrp/etrade/dao/mapper/ProductMapper.xml
... ... @@ -361,7 +361,7 @@
361 361 </choose>
362 362 </select>
363 363  
364   - <!-- 查询商品主键集合 - 商品库存列表 取状态=待审核+审核通过的,且有库存的商品 -->
  364 + <!-- 查询商品主键集合 - 商品库存列表 取状态=待审核+审核通过的,且库存>0的商品 -->
365 365 <select id="pageIdStockV2" resultType="java.lang.Long">
366 366 SELECT
367 367 DISTINCT p.id
... ... @@ -371,6 +371,7 @@
371 371 INNER JOIN stock st ON st.product_id = p.id
372 372 WHERE p.deleted = 1
373 373 AND pa.state != 2
  374 + AND st.stock > 0
374 375 <include refid="listWhere"/>
375 376 ORDER BY p.modified_time DESC, id DESC
376 377 </select>
... ...