接口 IBaseService<T>

所有超级接口:
com.baomidou.mybatisplus.extension.repository.IRepository<T>
所有已知子接口:
IPermissionService, IUserRoleService
所有已知实现类:
BaseServiceImpl, IPermissionServiceImpl, IUserRoleServiceImpl

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 void
    checkExists(boolean condition, Supplier<com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<T>> supplier, String message)
    校验指定条件是否存在
    default void
    checkExists(com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<T> lqw, String message)
    校验指定条件是否存在
    default boolean
    saveBatch(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 - 查询条件 LambdaQueryWrapper
      message - 存在提示
    • checkById

      default T checkById(Long id)
      根据 ID 查询 检查数据合法性
      参数:
      id - 主键ID
    • saveBatch

      default boolean saveBatch(Collection<T> entityList)
      插入(批量)
      参数:
      entityList - 实体对象集合