<if test="data!= null and data.size>0">
and
<foreach collection="data" index="key" item="value" separator="and">
<if test="value!= null and value!=''">
${key} = #{value}
</if>
</foreach>
</if>
<if test="data!= null and data.size>0">
and
<foreach collection="data" index="key" item="value" separator="and">
<if test="value!= null and value!=''">
${key} = #{value}
</if>
</foreach>
</if>