标签:stream param generate code log var bsp span 对象
单个:
<insert id="create" parameterType="com.dto.Cou" useGeneratedKeys="true" keyProperty="id"> insert into t ( batch_number ) values ( #{batchNumber,jdbcType=VARCHAR} ) </insert>
通过 对象. get获取
批量插入
<insert id="createBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id"> insert into t (id, batch_number ) values <foreach collection="list" item="item" index="index" separator=","> ( null, #{item.batchNumber,jdbcType=VARCHAR} ) </foreach> </insert>
获取
cMapper.createBatch(cList); cList.stream().forEach(cou->{ log.debug("cou:" + cou.getId() ); });
标签:stream param generate code log var bsp span 对象
原文地址:https://www.cnblogs.com/yrjns/p/11325046.html