-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于 Diff 根据内容忽略字段的建议 #76
Labels
enhancement
New feature or request
Comments
整理了一下诉求:
感觉3个都是很合理的改动,我争取尽快修改支持。 |
请问有进展吗? |
有的。昨天刚写完功能,还在写单元测试。今天争取给你打个SNAPSHOT包,过两天测完发正式版本 |
1.5.1-SNAPSHOT 快照版本发布。 新的文档见分支代码里的README中DIFF一节 晚几天发正式版 |
版本号 1.5.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
编辑接口使用 Diff,
msg
最终为:“【username】从【xxx】变成了【 】 【xxx】……”。实际上因为 MyBatis 配置的更新策略,是不会更新参数中为 null 的字段(此处即 username)的,但是操作日志中却显示了。建议新增一个全局配置,用于 Diff 时忽略 newObj 中为 null 或为空或指定内容的字段。还可以给
@LogRecordDiffField
新增一个属性用于单独配置。@LogRecordDiffIgnoreField
这个注解,可以变成@LogRecordDiffField
的一个属性。关于第 1 点,我现在自己的做法是在
implements IOperationLogGetService
的类中判断diffDTOList
是否不为空,如果不为空的话,获取其中 newValue 为 null 的,再去处理 msg。The text was updated successfully, but these errors were encountered: