接口 SuperService<Id extends Serializable,Entity extends SuperEntity<?>>

类型参数:
Id - ID
Entity - 实体
所有已知子接口:
SuperCacheService<Id,Entity>
所有已知实现类:
SuperCacheServiceImpl, SuperServiceImpl

public interface SuperService<Id extends Serializable,Entity extends SuperEntity<?>>
业务层
作者:
zuihou
  • 方法详细资料

    • getEntityClass

      Class<Entity> getEntityClass()
      获取实体的类型
      返回:
      实体类class类型
    • getIdClass

      Class<Id> getIdClass()
      获取主键的类型
      返回:
      主键class类型
    • getSuperManager

      SuperManager<Entity> getSuperManager()
      获取Manager的类型
      返回:
      Manager的class类型
    • save

      <SaveVO> Entity save(SaveVO entity)
      插入一条记录(选择字段,策略插入)
      参数:
      entity - 实体对象
      返回:
      是否插入成功
    • saveBatch

      boolean saveBatch(List<Entity> saveList)
      批量保存
      参数:
      saveList - 实体集合
      返回:
      是否执行成功
    • copy

      Entity copy(Id id)
      复制一条数据

      注意:若该数据存在唯一索引等限制条件,需要重写该方法进行判断或处理。

      参数:
      id - ID
      返回:
      复制后的实体
    • updateById

      <UpdateVO> Entity updateById(UpdateVO entity)
      根据 ID 修改实体中非空的字段
      参数:
      entity - 实体对象
      返回:
      是否修改成功
    • updateAllById

      <UpdateVO> Entity updateAllById(UpdateVO entity)
      根据id修改 entity 的所有字段
      参数:
      entity - 实体对象
      返回:
      是否修改成功
    • removeByIds

      boolean removeByIds(Collection<Id> idList)
      删除(根据ID 批量删除)
      参数:
      idList - 主键ID列表
      返回:
      是否删除成功
    • getById

      Entity getById(Id id)
      根据 ID 查询
      参数:
      id - 主键ID
      返回:
      实体对象或null
    • list

      List<Entity> list(com.baomidou.mybatisplus.core.conditions.Wrapper<Entity> queryWrapper)
      查询列表
      参数:
      queryWrapper - 实体对象封装操作类 QueryWrapper
      返回:
      实体对象集合或空集合
    • listByIds

      List<Entity> listByIds(List<Id> ids)
      批量查询
      参数:
      ids - 主键
      返回:
      实体对象集合或空集合
    • page

      <E extends com.baomidou.mybatisplus.core.metadata.IPage<Entity>> E page(E page, com.baomidou.mybatisplus.core.conditions.Wrapper<Entity> queryWrapper)
      翻页查询
      参数:
      page - 翻页对象
      queryWrapper - 实体对象封装操作类 QueryWrapper
      返回:
      实体分页对象