mybatis foreach where test用法
<select id="selectAny" resultType="user" parameterType="user"> select id, name, age, gmt_create gmtCreate from users <where> <if test="ids!=null"> and id in <foreach collection="ids" item="id" open="(" close=")" separator=","> #{id} </foreach> </if> </where> </select>