mybatis-plus踩坑,当使用自带updateById方法时,全局配置默认加了非空入库的校验,有业务需要添加null值时报错,可以在实体类上加改属性strategy= FieldStrategy.IGNORED,el = “name, jdbcType=VARCHAR”,之后uupdate和updateById都可以插入空值
/**
- 小数位类型名称
*/
@ApiModelProperty(value = “电表类型名称:小数位类型名称”)
@TableField(value = “NAME”,strategy= FieldStrategy.IGNORED,el = “name, jdbcType=VARCHAR”)
private String name;