码迷,mamicode.com
首页 > 其他好文 > 详细

mybatis插入返回主键

时间:2017-06-30 11:05:17      阅读:100      评论:0      收藏:0      [点我收藏+]

标签:cti   art   creat   nbsp   primary   tor   sign   主键   date   

 useGeneratedKeys="true" keyProperty="id"

<insert id="insertReturnPrimaryKey" parameterType="com.haitao55.spider.order.robot.platform.dos.TaskHistoryDO" useGeneratedKeys="true" keyProperty="id">
insert into task_history(
task_id,
agent_id,
assign_time,
start_time,
end_time,
status,
ctime,
utime,
account_id,
address_id,
coupon_id
) values(
#{taskId},
#{agentId},
#{assignTime},
#{startTime},
#{endTime},
#{status},
#{createTime},
#{updateTime},
#{accountId},
#{addressId},
#{couponId}
)
</insert>

mybatis插入返回主键

标签:cti   art   creat   nbsp   primary   tor   sign   主键   date   

原文地址:http://www.cnblogs.com/shuo1208/p/7097638.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!