方法一 :
<!-- 增加用户 -->
<insert id="saveUser" parameterType="com.yh.model.UserModel">
<selectKey keyProperty="id" resultType="java.lang.Integer" order="BEFORE">
SELECT SEQUENCESID.NEXTVAL FROM DUAL
</selectKey>
insert into users1(id,username,userpwd,sex,userphone,address) values(#{id},#{username},#{userpwd},#{sex},#{userphone},#{address})
</insert>
方法二 简单粗暴 有力
<insert id="addUser" parameterType="Users" >
insert into users values(user_seq.nextval,#{user_name},#{user_pwd},#{sex},#{file_id},#{file_name})
</insert>
oracle 分页 例子:
<select id="getPageList" resultType="Users" parameterType="map" >
select * from (select a.*,rownum rnum from (select * from users order by user_id)a where rownum<=#{end}) where rnum>#{start}
</select>