一.in 查询
<select id="findByCondition4ManualRefundQuery" resultMap="BaseResultMap" parameterType="com.yufusoft.payplatform.clearing.accountbalance.po.CsPayInfo" >
SELECT * FROM CS_PAY_INFO
where REFUND_STATUS in <foreach collection="list" item="refundStatus" open="(" separator="," close=")">
#{refundStatus}
</foreach>
<if test="subMerId != null and subMerId != ''">
AND SUB_MER_ID = #{subMerId}
</if>
<if test="transStatus != null and transStatus != ''">
AND TRANS_STATUS = #{transStatus}
</if>
<if test="transType != null and transType != ''">
AND TRANS_TYPE = #{transType}
</if>
</select>
二.like查询
<if test="customerQianZHui != null and customerQianZHui != ''">
AND USER_ID LIKE #{customerQianZHui}||'%'
</if>