1、
insert 不论你设置多少个字段,统一都要添加一遍
比如:insert into tb_user (id,name,age,password) value (null,”张三”,null,null);
insertSelective 选择性插入,只插入有数据的
比如:insert into tb_user (id,name) value (null,”张三”);
2、
updateByPrimaryKeySelective
updateByPrimaryKey
前者只是更新新的model中不为空的字段。
后者则会将为空的字段在数据库中置为NULL。