T - 实体类@RegisterMapper public interface SelectByPrimaryKeyMapper<T>
| Modifier and Type | Method and Description |
|---|---|
T |
selectByPrimaryKey(Serializable id)
根据主键id查询实体对象
|
List<T> |
selectListByPrimaryKey(Collection<? extends Serializable> ids)
根据主键字段查询实体对象,可以支持查询多个主键
|
List<T> |
selectListWithPrimaryKey(Collection<T> ids)
根据主键字段查询实体对象,可以支持查询多个主键
|
T |
selectWithPrimaryKey(T condition)
根据主键字段查询实体对象,可以支持多主键字段的表
|
@SelectProvider(type=SelectMapperTemplate.class, method="dynamicSql") T selectByPrimaryKey(Serializable id)
id - 主键idSelectMapperTemplate.selectByPrimaryKey(app.myoss.cloud.mybatis.table.TableInfo, org.apache.ibatis.mapping.MappedStatement)@SelectProvider(type=SelectMapperTemplate.class, method="dynamicSql") T selectWithPrimaryKey(T condition)
condition - 匹配的条件,主键有值的实体对象SelectMapperTemplate.selectWithPrimaryKey(app.myoss.cloud.mybatis.table.TableInfo, org.apache.ibatis.mapping.MappedStatement)@SelectProvider(type=SelectMapperTemplate.class, method="dynamicSql") List<T> selectListByPrimaryKey(@Param(value="ids") Collection<? extends Serializable> ids)
ids - 多个主键idSelectMapperTemplate.selectListByPrimaryKey(app.myoss.cloud.mybatis.table.TableInfo, org.apache.ibatis.mapping.MappedStatement)@SelectProvider(type=SelectMapperTemplate.class, method="dynamicSql") List<T> selectListWithPrimaryKey(@Param(value="ids") Collection<T> ids)
ids - 多个主键idSelectMapperTemplate.selectListWithPrimaryKey(app.myoss.cloud.mybatis.table.TableInfo, org.apache.ibatis.mapping.MappedStatement)Copyright © 2018–2022. All rights reserved.