public interface BaseDao<T>
extends com.baomidou.mybatisplus.core.mapper.BaseMapper<T>
| 限定符和类型 | 方法和说明 |
|---|---|
int |
deleteBatchIdsWithDp(Collection<? extends Serializable> idList)
删除(根据ID 批量删除)
|
int |
deleteByIdWithDp(Serializable id)
根据ID删除
|
int |
deleteByMapWithDp(Map<String,Object> columnMap)
根据 columnMap 条件,删除记录
|
int |
deleteWithDp(com.baomidou.mybatisplus.core.conditions.Wrapper<T> wrapper)
根据 entity 条件,删除记录
|
List<T> |
selectBatchIdsWithDp(Collection<? extends Serializable> idList)
查询(根据ID 批量查询)
|
T |
selectByIdWithDp(Serializable id)
根据 ID 查询
|
List<T> |
selectByMapWithDp(Map<String,Object> columnMap)
查询(根据 columnMap 条件)
|
Integer |
selectCountWithDp(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
根据 Wrapper 条件,查询总记录数
|
List<T> |
selectListWithDp(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
根据 entity 条件,查询全部记录
|
<E extends com.baomidou.mybatisplus.core.metadata.IPage<Map<String,Object>>> |
selectMapsPageWithDp(E page,
com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
根据 Wrapper 条件,查询全部记录(并翻页)
|
List<Map<String,Object>> |
selectMapsWithDp(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
根据 Wrapper 条件,查询全部记录
|
List<Object> |
selectObjsWithDp(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
根据 Wrapper 条件,查询全部记录
注意: 只返回第一个字段的值
|
T |
selectOneWithDp(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
根据 entity 条件,查询一条记录
|
<E extends com.baomidou.mybatisplus.core.metadata.IPage<T>> |
selectPageWithDp(E page,
com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
根据 entity 条件,查询全部记录(并翻页)
|
int |
updateByIdWithDp(T entity)
根据 ID 修改
|
int |
updateWithDp(T entity,
com.baomidou.mybatisplus.core.conditions.Wrapper<T> updateWrapper)
根据 whereEntity 条件,更新记录
|
int deleteByIdWithDp(Serializable id)
id - int deleteByMapWithDp(@Param(value="cm")
Map<String,Object> columnMap)
columnMap - 表字段 map 对象int deleteWithDp(@Param(value="ew")
com.baomidou.mybatisplus.core.conditions.Wrapper<T> wrapper)
wrapper - 实体对象封装操作类(可以为 null)int deleteBatchIdsWithDp(@Param(value="coll")
Collection<? extends Serializable> idList)
idList - 主键ID列表(不能为 null 以及 empty)int updateByIdWithDp(@Param(value="et")
T entity)
entity - 实体对象int updateWithDp(@Param(value="et")
T entity,
@Param(value="ew")
com.baomidou.mybatisplus.core.conditions.Wrapper<T> updateWrapper)
entity - 实体对象 (set 条件值,可以为 null)updateWrapper - 实体对象封装操作类(可以为 null,里面的 entity 用于生成 where 语句)T selectByIdWithDp(Serializable id)
id - 主键IDList<T> selectByMapWithDp(@Param(value="cm") Map<String,Object> columnMap)
columnMap - 表字段 map 对象List<T> selectBatchIdsWithDp(@Param(value="coll") Collection<? extends Serializable> idList)
idList - 主键ID列表(不能为 null 以及 empty)T selectOneWithDp(@Param(value="ew") com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
queryWrapper - 实体对象封装操作类(可以为 null)Integer selectCountWithDp(@Param(value="ew") com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
queryWrapper - 实体对象封装操作类(可以为 null)List<T> selectListWithDp(@Param(value="ew") com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
queryWrapper - 实体对象封装操作类(可以为 null)List<Map<String,Object>> selectMapsWithDp(@Param(value="ew") com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
queryWrapper - 实体对象封装操作类(可以为 null)List<Object> selectObjsWithDp(@Param(value="ew") com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
注意: 只返回第一个字段的值
queryWrapper - 实体对象封装操作类(可以为 null)<E extends com.baomidou.mybatisplus.core.metadata.IPage<T>> E selectPageWithDp(E page, @Param(value="ew") com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
page - 分页查询条件(可以为 RowBounds.DEFAULT)queryWrapper - 实体对象封装操作类(可以为 null)Copyright © 2023. All rights reserved.