0
点赞
收藏
分享

微信扫一扫

Mybatis-Plus修改指定字段&Mybatis-Plus修改部分字段&Mybatis-Plus更新部分字段

彭维盛 2022-03-30 阅读 79
java后端

通过UpdateWrapper修改指定的列

update 时传入null 是关键

重点语句:updateWrapper.set(“SESSION_KEY”, “abc”);

         this.mapper.update(null, wrapperUpdate);

使用版本:3.0.4

使用场景:

UpdateWrapper updateWrapper = new UpdateWrapper();

updateWrapper.eq(“ID”, 0);

updateWrapper.set(“SESSION_KEY”, “abc”);

baseMapper.update(null, updateWrapper);
————————————————

https://blog.csdn.net/Mr_ZhangAdd/article/details/84257225

https://www.jianshu.com/p/5eaf651a0e08

举报

相关推荐

0 条评论