mybatis通过注解传多个参数的方式

版权声明: https://blog.csdn.net/weixin_40550726/article/details/82558510

XXXMapper.java文件中的方法

int deleteByUserIdAndBookId(@Param("userId")int userId,@Param("bookId")int bookId);

XXXMapper.xml文件中的配置

<delete id="deleteByUserIdAndBookId" >
    delete from borrowingbooks
    where user_id = #{userId} and book_id = #{bookId}
  </delete> 

猜你喜欢

转载自blog.csdn.net/weixin_40550726/article/details/82558510
今日推荐