首页 > 其他 > 详细

mybatis如何接受map类型的参数

时间:2019-10-28 17:00:05      阅读:967      评论:0      收藏:0      [点我收藏+]

Mybatis传入参数类型为Map

 

mybatis更新sql语句:

1
2
3
4
5
6
7
8
9
<update id="publishT00_notice" parameterType="Map">
update test
set createdate = #{createdate},
creator = #{creator}
where id in
<foreach collection="ids" item="ids" separator="," open="(" close=")">
#{ids}
</foreach>
</update>

传入map参数类型:

1
2
3
4
5
HashMap<String,Object> map = new HashMap<String, Object>();
map.put("creator", "creator");
map.put("createdate", "createdate");
String[] ids = {"1","2"};
map.put("ids", ids );

 

 

mybatis如何接受map类型的参数

原文:https://www.cnblogs.com/YuyuanNo1/p/11753216.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!