您的位置:首页 > 移动开发

Mybatis mapper配置文件传入数组参数,同时操作一组数据

2016-12-27 16:27 531 查看
mapper.xml

<select id="findMemberByIds" resultType="map">
select
id,
token,
username,
pic
from
lm_member
<where>
id in
<foreach collection="array" item="id" index="index"
open="(" close=")" separator=",">
#{id}
</foreach>
</where>
</select>mapper.java
public List<Map<String, Object>> findMemberByIds(Long[] ids);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mybatis java mapper
相关文章推荐