SMSshuai

Results 2 issues of SMSshuai

通过updateByPrimaryKeySelective(T)方法更新数据的时候主键ID会变化 数据库主键ID自增 如id =10 ,11, 12,13 ,因业务需求删除了其中一个id =11。 在执行updateByPrimaryKeySelective方法是传入的数据id是12 ,但是执行成功后,实体内的id变成了11(这个id数据不存在,实体内的其他数据都正常)。 后续测试后发现,执行该方法后如果该条数据的id大于空缺数据的id就会返回空数据id。 比如:删除了id11 更新id11的数据都会返回id=11. 如果删除多条数据,会返回正序第一个被删掉的id。 实体增加了如下注解 @Id @KeySql(useGeneratedKeys = true) @Column(insertable = false,updatable = false) @ApiModelProperty(value="id") private Long id; [数据对比](https://download.dameng.com/eco-file-server/file/eco/preview/202302090835589O60AL0TGOMGWRV34S) [代码执行截图](https://download.dameng.com/eco-file-server/file/eco/preview/20230209083511WML8RUUF23ZKJ3DRLW)...

Optimization Suggestion: If the variable name is changed manually after the plug-in is used to modify the variable, there is a probability that two underscores will appear when the plug-in...