<insert id=”insert” parameterType=”com.xxx.SystemDepartment”> <selectKey keyProperty=”id” resultType=”String” order=”BEFORE”> select sys_guid() from dual </selectKey> insert into SYSTEM_DEPARTMENT (ID,DEPNAME, SUPERID, SORT, STATE) values ( #{id,jdbcType=VARCHAR},#{depname,jdbcType=VARCHAR}, #{superid,jdbcType=DECIMAL}, #{sort,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL})</insert>