select * from tablename
where id in
<foreach collection="ids.split(',')" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
或
select * from tablename
where
find_in_set(id,#{ids})
select * from tablename
where id in
<foreach collection="ids.split(',')" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
或
select * from tablename
where
find_in_set(id,#{ids})