<update id="batchUpdate" parameterType="java.util.Map">
UPDATE TB_DOOR_DOOR SET
CONTROLLERID=#{newsn,jdbcType=NUMERIC}
WHERE CONTROLLERID in
<foreach item="controllersn" index="index" collection="snList" open="(" separator="," close=")">
#{controllersn}
</foreach>
</update>
servrice 层:传送:
@Override
public void batchUpdate(List<String> snlist, String newsn) {
// TODO Auto-generated method stub
HashMap<String, Object> hashmap=new HashMap<String, Object>(256);
hashmap.put("snList", snlist);
hashmap.put("newsn", newsn);
this.doordao.updateByKey("batchUpdate", newsn);
}
业务流程层:
List<String> doorlist=new ArrayList<String>(256);
doorlist.add(sn);
this.doorService.batchUpdate(doorlist, newsn);
最后
以上就是纯情鞋垫最近收集整理的关于ibtis 批量处理的全部内容,更多相关ibtis内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复