<select id="test" parameterType="java.util.List" resultType="user"> select * from jk_user where id in <foreach collection="list" item="id" open="(" close=")" separator=","> #{id} </foreach> </select>