<insert id="save" parameterType="pd" useGeneratedKeys="true" keyProperty="news_id">
parameterType:参数类型
keyProperty:主键名
新增数据返回主键
<insert id="save" .... <selectKey resultType="INTEGER" order="BEFORE" keyProperty="userId"> SELECT SEQ_USER.NEXTVAL as userId from DUAL </selectKey> </insert>