1.当传入参数为数组
List<ContractRealtion> selectDuplicateSkus(@Param("skuNo") String[] skuNo,@Param("realtionId")Integer realtionId);
<select id="selectDuplicateSkus" resultMap="BaseResultMap" parameterType="java.util.List">
SELECT
<include refid="Base_Column_List" />
FROM V_CONTRACT_REALTION
WHERE IS_DEL=0
and SKU_NO in
<foreach collection="skuNo" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
<if test="realtionId != null ">
and CONTRACT_LABLE_ID != #{realtionId,jdbcType=INTEGER}
</if>
</select>
2.当传入参数为集合时
List<InformationSkuData> selectSkuDownSale(List<String> skuNOs);
<select id="selectSkuDownSale" resultType="com.vedeng.op.information.domain.InformationSkuData" parameterType="java.util.List">
select SKU_NO as skuNo
from V_SKU
where IS_DEL=0
and SKU_NO in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
and IS_ON_SALE=0
</select>
collection的属性值应当和传过来的参数值相对应