Mybatis传多个参数(推荐)

 Dao层的函数方法

    int deleteMsgById(@Param("name") String name,@Param("id") String id);

  对应Mapper

    <delete id="deleteMsgById" parameterType="String">
        DELETE FROM msg WHERE id=#{id} and (userId in(select id from [user] where userName=#{name}) or #{name}='sky')
    </delete>

  

posted @ 2017-03-22 15:07  sky丶尕少  阅读(176)  评论(0编辑  收藏  举报