public interface FaithBaseMapper<T>
extends com.baomidou.mybatisplus.core.mapper.BaseMapper<T>
| 限定符和类型 | 方法和说明 |
|---|---|
List<T> |
alwaysSelectBatchIds(Collection<? extends Serializable> idList)
查询(根据ID 批量查询)
|
T |
alwaysSelectById(Serializable id)
根据 ID 查询
|
Long |
alwaysSelectCount(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
根据 Wrapper 条件,查询总记录数
|
List<T> |
alwaysSelectList(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
根据 entity 条件,查询全部记录
|
default T |
alwaysSelectOne(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
根据 entity 条件,查询一条记录
查询一条记录,例如 qw.last("limit 1") 限制取一条记录, 注意:多条数据会报异常
|
int |
alwaysUpdate(T entity,
com.baomidou.mybatisplus.core.conditions.Wrapper<T> updateWrapper)
根据 whereEntity 条件,更新记录(但是不包含逻辑删除)
|
int |
alwaysUpdateSomeColumnById(T entity)
根据 ID 更新固定的那几个字段(但是不包含逻辑删除)
|
int alwaysUpdateSomeColumnById(@Param(value="et")
T entity)
entity - 实体int alwaysUpdate(@Param(value="et")
T entity,
@Param(value="ew")
com.baomidou.mybatisplus.core.conditions.Wrapper<T> updateWrapper)
entity - 实体对象 (set 条件值,可以为 null)updateWrapper - 实体对象封装操作类(可以为 null,里面的 entity 用于生成 where 语句)T alwaysSelectById(Serializable id)
id - 主键IDList<T> alwaysSelectBatchIds(@Param(value="coll") Collection<? extends Serializable> idList)
idList - 主键ID列表(不能为 null 以及 empty)default T alwaysSelectOne(@Param(value="ew") com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
查询一条记录,例如 qw.last("limit 1") 限制取一条记录, 注意:多条数据会报异常
queryWrapper - 实体对象封装操作类(可以为 null)Long alwaysSelectCount(@Param(value="ew") com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
queryWrapper - 实体对象封装操作类(可以为 null)Copyright © 2023. All rights reserved.