<!--根据goodsId批量查询MallGoods信息 -->
<select id="findMallGoodsByGoodsIds" resultMap="mallGoodsEntity"
fetchSize="100">
SELECT
<include refid="fields" />
from mall_goods
<where>
<choose>
<when test="goodsIds==null || goodsIds.size==0">1=2</when>
<otherwise>
goods_id in
<foreach collection="goodsIds" item="item" open="("
separator="," close=")">${item}</foreach>
</otherwise>
</choose>
</where>
</select>
<select id="findMallGoodsByGoodsIds" resultMap="mallGoodsEntity"
fetchSize="100">
SELECT
<include refid="fields" />
from mall_goods
<where>
<choose>
<when test="goodsIds==null || goodsIds.size==0">1=2</when>
<otherwise>
goods_id in
<foreach collection="goodsIds" item="item" open="("
separator="," close=")">${item}</foreach>
</otherwise>
</choose>
</where>
</select>