mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-17 16:56:39 +08:00
update 优化 增加selectOne使用注意事项
This commit is contained in:
parent
f2e0361fb6
commit
bf10a13088
@ -225,7 +225,8 @@ public interface BaseMapperPlus<T, V> extends BaseMapper<T> {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据条件查询单个VO对象,并指定返回的VO对象的类型
|
||||
* 根据条件查询单个VO对象,并指定返回的VO对象的类型(自动拼接 limit 1)
|
||||
* 注意不要再自己添加 limit 1 做限制了
|
||||
*
|
||||
* @param wrapper 查询条件Wrapper
|
||||
* @param voClass 返回的VO对象的Class对象
|
||||
@ -237,7 +238,8 @@ public interface BaseMapperPlus<T, V> extends BaseMapper<T> {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据条件查询单个实体对象,并将其转换为指定的VO对象
|
||||
* 根据条件查询单个实体对象,并将其转换为指定的VO对象(自动拼接 limit 1)
|
||||
* 注意不要再自己添加 limit 1 做限制了
|
||||
*
|
||||
* @param wrapper 查询条件Wrapper
|
||||
* @param voClass 要转换的VO类的Class对象
|
||||
@ -254,8 +256,8 @@ public interface BaseMapperPlus<T, V> extends BaseMapper<T> {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据条件查询单条记录(自动限制返回 1 条数据,不依赖 {@code throwEx} 参数)
|
||||
*
|
||||
* 根据条件查询单条记录(自动拼接 limit 1 限制返回 1 条数据,不依赖 {@code throwEx} 参数)
|
||||
* 注意不要再自己添加 limit 1 做限制了
|
||||
* <p>
|
||||
* <strong>注意:</strong>
|
||||
* 1. 使用 {@code Page<>(1, 1)} 强制分页查询,确保 SQL 自动添加 {@code LIMIT 1},因此 {@code throwEx} 参数不再生效
|
||||
|
Loading…
Reference in New Issue
Block a user