<insert id="add" parameterType="vo.Category"> <selectKey resultType="java.lang.Short" order="AFTER" keyProperty="id"> SELECT LAST_INSERT_ID() AS id </selectKey> insert into category (name_zh, parent_id, show_order, delete_status, description ) values (#{nameZh,jdbcType=VARCHAR}, #{parentId,jdbcType=SMALLINT}, #{showOrder,jdbcType=SMALLINT}, #{deleteStatus,jdbcType=BIT}, #{description,jdbcType=VARCHAR} ) </insert>