<select id="findProductsList" resultMap="BaseResultMap">
SELECT ID,PRODUCTID,CONTACTSNAME,PRODUCTNAME,SPECIFICATION,MEASURE,INSTALLTIME,WARRANTYTIME,QUANTITY
FROM PRODUCTS
<where>
<if test="productid != null and productid != ''">
AND productid LIKE #{productid}
</if>
<if test="contactsname != null and contactsname != ''">
AND contactsname LIKE #{contactsname}
</if>
<if test="productname != null and productname != ''">
AND productname LIKE #{productname}
</if>
<if test="specification != null and specification != ''">
AND specification LIKE #{specification}
</if>
<if test="measure != null and measure != ''">
AND measure LIKE #{measure}
</if>
<if test="installtime != null and installtime != ''">
AND installtime LIKE #{contactsname}
</if>
<if test="warrantytime != null and warrantytime != ''">
AND warrantytime LIKE #{warrantytime}
</if>
<if test="quantity != null and quantity != ''">
OR quantity LIKE #{quantity}
</if>
</where>
该怎么写啊