Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
提供继承了
BaseMapper
,FnMapper
的LogicalMapper
类,在其中覆写了父类的查、改、删方法实现方式很简单,只是在原有拼接
SQL
的方法中附加一行对逻辑删除值的判断,比如:AND status = 0
逻辑删除的值由
@LogicalColumn
注解指定,支持null
值。只需要在实体类字段上添加
@LogicalColumn
,并且让业务表mapper
类继承LogicalMapper
即可使用。