我是靠谱客的博主 火星上棒球,这篇文章主要介绍Mybatis mapper配置文件传入数组参数,同时操作一组数据,现在分享给大家,希望可以做个参考。

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 mapper配置文件传入数组参数,同时操作一组数据的全部内容,更多相关Mybatis内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(126)

评论列表共有 0 条评论

立即
投稿
返回
顶部