<sql id="queryProductByCustomerCodeOrCustomerLineCodeWhere">标签:xml,CUSTOMER,PRODUCT,CODE,集合,mybatis From: https://www.cnblogs.com/shaowangwu/p/16880142.html
IS_DELETED = '0'
<if test="customerCode != null and customerCode !='' ">and CUSTOMER_CODE = #{customerCode}</if>
<if test="customerLineCode != null and customerLineCode !='' ">and CUSTOMER_LINE_CODE = #{customerLineCode}</if>
<if test="productCodeList != null and productCodeList.size>0 ">and PRODUCT_CODE in
<foreach item="productCode" index="index" collection="productCodeList" open="(" separator="," close=")">
#{productCode}
</foreach>
</if>
and PROD_SERIES=0 and CHARINDEX('系列', PRODUCT_CODE)=0
order by PRODUCT_CODE
</sql>