例如:map中字段:addressList,cityList的值并非String类型,而是List类型案例;
<select id="getStudentInfo" parameterType="map" resultType="map">
select * from student_data
where ID IS NOT NULL
<if test = "null != addressList and addressList.size > 0">
and address in
<foreach collection="addressList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test = "null != cityList and cityList.size > 0">
and city in
<foreach collection="cityList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</select>