mybatis-plus 通过 updateById 更新部分字段数据时出现所有数据被更新(被设为默认值)
但当执行时发现 type 属性也被更新了,且为 int 默认值 0。
一顿百度,什么也没查到之后发现
需要设置 实体类 user 的 type 为 Integer,因为 int 不能为 null,而 Integer 可以。
https://blog.csdn.net/weixin_46376562/article/details/126126216
但当执行时发现 type 属性也被更新了,且为 int 默认值 0。
一顿百度,什么也没查到之后发现
需要设置 实体类 user 的 type 为 Integer,因为 int 不能为 null,而 Integer 可以。
https://blog.csdn.net/weixin_46376562/article/details/126126216