接口 IBaseService<T>
- 所有超级接口:
com.baomidou.mybatisplus.extension.repository.IRepository<T>
- 所有已知子接口:
IPermissionService,IUserRoleService
public interface IBaseService<T>
extends com.baomidou.mybatisplus.extension.repository.IRepository<T>
自定义 Service 基类
尊重知识产权,CV 请保留版权,海文科技 https://hiver.cc 出品,不允许非法使用,后果自负
- 作者:
- Yazhi Li
-
字段概要
从接口继承的字段 com.baomidou.mybatisplus.extension.repository.IRepository
DEFAULT_BATCH_SIZE -
方法概要
修饰符和类型方法说明default T根据 ID 查询 检查数据合法性default voidcheckExists(boolean condition, Supplier<com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<T>> supplier, String message) 校验指定条件是否存在default voidcheckExists(com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<T> lqw, String message) 校验指定条件是否存在default booleansaveBatch(Collection<T> entityList) 插入(批量)从接口继承的方法 com.baomidou.mybatisplus.extension.repository.IRepository
count, count, exists, getBaseMapper, getById, getEntityClass, getMap, getObj, getOne, getOne, getOneOpt, getOneOpt, getOptById, ktQuery, ktUpdate, lambdaQuery, lambdaQuery, lambdaUpdate, list, list, list, list, listByIds, listByMap, listMaps, listMaps, listMaps, listMaps, listObjs, listObjs, listObjs, listObjs, page, page, pageMaps, pageMaps, query, remove, removeById, removeById, removeById, removeByIds, removeByIds, removeByMap, save, saveBatch, saveOrUpdate, saveOrUpdateBatch, update, update, update, updateBatchById, updateById
-
方法详细资料
-
checkExists
default void checkExists(boolean condition, Supplier<com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<T>> supplier, String message) 校验指定条件是否存在- 参数:
condition- 判断条件supplier- 查询条件message- 存在提示
-
checkExists
default void checkExists(com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<T> lqw, String message) 校验指定条件是否存在- 参数:
lqw- 查询条件 LambdaQueryWrappermessage- 存在提示
-
checkById
根据 ID 查询 检查数据合法性- 参数:
id- 主键ID
-
saveBatch
插入(批量)- 参数:
entityList- 实体对象集合
-