1.getOne
If there are multiple query results, an exception will be thrown at this time
By default, getOne throws an exception directly when there are multiple query results, and the bottom layer calls the overloaded method getOne(Wrapper queryWrapper, boolean throwEx)
The overloaded method getOne(Wrapper queryWrapper, boolean throwEx) executes different methods according to whether the input parameter throws an exception. If the second parameter is true, the method will be executed directly
;
Tombstone @TableLogic
-
An annotation @TableLogic needs to be added on the deleted field
-
Write the configuration in the configuration file
global-config:
db-config:
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)