根据selectkey获取
<insert id=
"insertUser"
parameterType=
"com.entity.user"
>
insert into test (name) values (#{name})
<selectKey keyProperty=
"id"
resultType=
"java.lang.Integer"
>
select LAST_INSERT_ID() as id
</selectKey>
</insert>
返回的主键在pojo对象里