dao中的方法
public List<Long> getListInId(List<Long> list);
mapper文件中的配置
<select id="getListInId" parameterType="java.lang.Long"
resultType="java.lang.Long">
select id from student where id in
<foreach collection="list" index="index" item="item" open="("
separator="," close=")">
#{item}
</foreach>
</select>