|
@@ -2,7 +2,7 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.fuint.repository.mapper.MtGoodsMapper">
|
|
|
<select id="getStoreGoodsList" resultType="com.fuint.repository.model.MtGoods">
|
|
|
- select * from mt_goods t where (t.STORE_ID = #{storeId} or (t.STORE_ID = 0 AND t.id IN( SELECT s.GOODS_ID FROM mt_store_goods s WHERE STORE_ID = #{storeId} )))
|
|
|
+ select * from mt_goods t where (t.STORE_ID = #{storeId} or (t.STORE_ID = 0 AND t.id IN( SELECT s.GOODS_ID FROM mt_store_goods s WHERE s.STORE_ID = #{storeId} AND s.STATUS = 'A')))
|
|
|
<if test="cateId != null and cateId > 0">
|
|
|
AND t.CATE_ID = #{cateId}
|
|
|
</if>
|
|
@@ -17,7 +17,7 @@
|
|
|
AND t.MERCHANT_ID = #{merchantId}
|
|
|
</if>
|
|
|
<if test="storeId != null and storeId > 0">
|
|
|
- and (t.STORE_ID = #{storeId} or (t.STORE_ID = 0 AND t.id IN( SELECT s.GOODS_ID FROM mt_store_goods s WHERE STORE_ID = #{storeId} )))
|
|
|
+ and (t.STORE_ID = #{storeId} or (t.STORE_ID = 0 AND t.id IN( SELECT s.GOODS_ID FROM mt_store_goods s WHERE s.STORE_ID = #{storeId} AND s.STATUS = 'A' )))
|
|
|
</if>
|
|
|
and t.PRICE > 0
|
|
|
and (t.name like concat('%',#{keyword},'%') or t.goods_no = #{keyword} or t.ID = #{keyword} or t.description like concat('%',#{keyword},'%'))
|
|
@@ -42,7 +42,7 @@
|
|
|
AND g.MERCHANT_ID = #{merchantId}
|
|
|
</if>
|
|
|
<if test="storeId != null and storeId > 0">
|
|
|
- AND (g.STORE_ID = #{storeId} OR (g.STORE_ID = 0 AND g.id IN( SELECT s.GOODS_ID FROM mt_store_goods s WHERE STORE_ID = #{storeId} )))
|
|
|
+ AND (g.STORE_ID = #{storeId} OR (g.STORE_ID = 0 AND g.id IN( SELECT s.GOODS_ID FROM mt_store_goods s WHERE s.STORE_ID = #{storeId} AND s.STATUS = 'A')))
|
|
|
</if>
|
|
|
<if test="cateId != null and cateId > 0">
|
|
|
AND g.CATE_ID = #{cateId}
|