if (uIds.size() > 0) { map.put("uIds", uIds); } else { map.put("uIds", null); }
<select id="queryCourseEvaluationPeopleByUIds" resultType="map" resultMap="BaseResultMap"> 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>
时间: 2024-11-08 23:04:32