<select
id=""
parameterType=""
parameterMap=""
resultType=""
resultMap=""
flushCache=""
useCache=""
timeout=""
fetchSize=""
statementType=""
resultSetType=""
>
<insert
id=""
parameterType=""
flushCache=""
statementType=""
keyProperty=""
keyColumn=""
useGeneratedKeys=""
timeout=""
>
<update
id=""
parameterType=""
flushCache=""
timeout=""
statementType=""
>
<delete
id=""
parameterType=""
flushCache=""
timeout=""
statementType=""
>
<mapper namespace=" ">
<insert parameterType="输入参数类型" parameterMap="输入参数集合" resultType="结果类型" resultClass="结果类" resultMap= "结果集合"></insert>
<select id="findUserById" parameterType="int" resultType="User" >
select * from user_table where id = #{id}
</select>
<select id="findUserByName" parameterType="String" resultType="User" >
select * from user_table where user_name Like '%%${value}'
</select>
<insert id = "insertUser" parameterType="User" >
<selectKey keyProperty="id" order="BEFORE" resultType="String">
select 序列名.nextval()
</selectKey>
insert into user()
values()
</insert>
//update返回执行之后被改变的信息条数
<update id="updateUserById" parameterType="User" >
update user_table set user_name=#{username} where id = #{id}
</update>
<delete id="deleteUserById" parameterType="Integer" >
delete from user_table where id = #{id}
</delete>
</mapper>
原文地址:https://www.cnblogs.com/Mr-O-O/p/10575509.html
时间: 2024-10-14 08:16:34