我这样写的。
<insert id="addTMsgSmsinfoForBatch" parameterType="java.util.List">
<selectKey resultType="long" keyProperty="id" order="BEFORE">
SELECT T_MSG_SMSINFO_SEQ.NEXTVAL AS id FROM dual
</selectKey>
INSERT INTO T_MSG_SMSINFO ( <include refid="columns_auotmsgsending" />) VALUES
<foreach collection="list" item="item" index="index"
separator=",">
( #{item.id},#{item.ecid},#{item.userid},#{item.sendermsisdn},#{item.receiverinfo},
#{item.totalrec},#{item.smsorigin},#{item.originid},#{item.smscontent},#{item.smstype},
#{item.scheduletime},#{item.auditstatus},#{item.inserttime},#{item.updatetime}
)
</foreach>
</insert>
就是在:
<selectKey resultType="long" keyProperty="id" order="BEFORE">
SELECT T_MSG_SMSINFO_SEQ.NEXTVAL AS id FROM dual
</selectKey>
有问题
Map<String,Object> dataMap = new HashMap<String,Object>()dataMap.put("0","1")
dataMap.put("1","1")
dataMap.put("2","1")
dataMap.put("3","3")
//...
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)