Mybatis调用存储过程

1、insert

    <insert id="addUser" parameterType="com.po.User" statementType="CALLABLE">
        {call insert_user(
        #{id,mode=OUT,jdbcType=INTEGER},#{name,mode=IN},#{sex,mode=IN},#{age,mode=IN})}
    </insert>

 

2、delete

<delete id="deleteUser" parameterType="Integer" statementType="CALLABLE">
       {call deleteUser(#{id,mode=IN})}
</delete>

 

3、update

    <update id="updateUser" parameterType="user" statementType="CALLABLE">
        {call updateUser(#{id,mode=IN},#{name,mode=IN},#{sex,mode=IN},#{age,mode=IN})}
    </update>

-----------------------------------------------------------------------------------------------------------------------------------------

资料来源:https://blog.csdn.net/dwenxue/article/details/82257944

posted @ 2019-09-10 09:59  hcha0  阅读(312)  评论(0编辑  收藏  举报