Revert "update 优化 增加selectOne使用注意事项"

This reverts commit bf10a13088.
This commit is contained in:
疯狂的狮子Li
2025-09-01 14:25:40 +08:00
parent f683ef00b8
commit 655e84012c

View File

@ -225,8 +225,7 @@ public interface BaseMapperPlus<T, V> extends BaseMapper<T> {
} }
/** /**
* 根据条件查询单个VO对象并指定返回的VO对象的类型(自动拼接 limit 1) * 根据条件查询单个VO对象并指定返回的VO对象的类型
* 注意不要再自己添加 limit 1 做限制了
* *
* @param wrapper 查询条件Wrapper * @param wrapper 查询条件Wrapper
* @param voClass 返回的VO对象的Class对象 * @param voClass 返回的VO对象的Class对象
@ -238,8 +237,7 @@ public interface BaseMapperPlus<T, V> extends BaseMapper<T> {
} }
/** /**
* 根据条件查询单个实体对象并将其转换为指定的VO对象(自动拼接 limit 1) * 根据条件查询单个实体对象并将其转换为指定的VO对象
* 注意不要再自己添加 limit 1 做限制了
* *
* @param wrapper 查询条件Wrapper * @param wrapper 查询条件Wrapper
* @param voClass 要转换的VO类的Class对象 * @param voClass 要转换的VO类的Class对象
@ -256,8 +254,8 @@ public interface BaseMapperPlus<T, V> extends BaseMapper<T> {
} }
/** /**
* 根据条件查询单条记录(自动拼接 limit 1 限制返回 1 条数据,不依赖 {@code throwEx} 参数) * 根据条件查询单条记录(自动限制返回 1 条数据,不依赖 {@code throwEx} 参数)
* 注意不要再自己添加 limit 1 做限制了 *
* <p> * <p>
* <strong>注意:</strong> * <strong>注意:</strong>
* 1. 使用 {@code Page<>(1, 1)} 强制分页查询,确保 SQL 自动添加 {@code LIMIT 1},因此 {@code throwEx} 参数不再生效 * 1. 使用 {@code Page<>(1, 1)} 强制分页查询,确保 SQL 自动添加 {@code LIMIT 1},因此 {@code throwEx} 参数不再生效