if (uIds.size() > 0) { map.put("uIds", uIds); } else { map.put("uIds", null); }
<select >
select * from t_se_course_comment
<where>
<if test="map.kid!=null and map.kid!=''">
and course_id = #{map.kid}
</if>
<if test="map.uIds!=null">
and evaluation_teacher in
<foreach collection="map.uIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</where>
order by id ASC
</select>