加这两行就可以返回这个插入对象的自增的主键
<insert id="insertSeatPortraitData" parameterType="seatPortrait" keyProperty="id" useGeneratedKeys="true">
insert into seating_portrait (
system_producer
,system_type,
system_processer,
hostname,
system_version,
physical_memory,
mac_addr,
c_area,
run_time,
register_user,
dongdong_dir_size,
all_c_space,
ost_file_size,
disks,
ip,
c_used_rate ,
sn,start_time
) values (
#{system_producer}, #{system_type},#{system_processer},#{hostname},#{system_version},#{physical_memory},#{mac_addr},
#{c_area},#{run_time},#{register_user},#{dongdong_dir_size},#{all_c_space},#{ost_file_size},#{disks},#{ip}
,#{c_used_rate},#{sn},#{start_time}
)
</insert>
05-25 22:08