<insert id="insert" parameterType="map" <selectKey resultType="java.lang.Long" order="AFTER" keyProperty="id"> SELECT a.nextval as id from DUAL </selectKey>
Map<String, Object> map = new HashMap<String, Object>(); map.put("returnedId", 0); map.put("message", message); // other paramters mapper.insertRecord(map); return map.get("returnedId");
keyProperty 的设置自动赋值查询结果到map