mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 17:18:24 +08:00
!180 BaseMapper添加 selectOneWithRelationsById 方法 ,关联 issue --> https://gitee.com/mybatis-flex/mybatis-flex/issues/I7NH6K
Merge pull request !180 from barql/272378774@qq.com
This commit is contained in:
commit
c9a1b5dc83
@ -490,6 +490,16 @@ public interface BaseMapper<T> {
|
||||
return MapperUtil.queryRelations(this, MapperUtil.getSelectOneResult(selectListByQuery(queryWrapper)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主表主键来查询 1 条数据。
|
||||
*
|
||||
* @param id 主表主键
|
||||
* @return 实体类数据
|
||||
*/
|
||||
default T selectOneWithRelationsById(Serializable id) {
|
||||
return MapperUtil.queryRelations(this, selectOneById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据查询条件来查询 1 条数据。
|
||||
*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user