类 ComServiceImpl<M extends ComMapper<T>,T>

java.lang.Object
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl<M,T>
cn.com.pism.mybatis.core.service.impl.ComServiceImpl<M,T>
所有已实现的接口:
ComService<T>, com.baomidou.mybatisplus.extension.service.IService<T>

public class ComServiceImpl<M extends ComMapper<T>,T> extends com.baomidou.mybatisplus.extension.service.impl.ServiceImpl<M,T> implements ComService<T>
从以下版本开始:
24-08-25 00:34
作者:
perccyking
  • 字段概要

    从类继承的字段 com.baomidou.mybatisplus.extension.service.impl.ServiceImpl

    baseMapper, log

    从接口继承的字段 com.baomidou.mybatisplus.extension.service.IService

    DEFAULT_BATCH_SIZE
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    int
    批量保存
    int
    批量按主键更新
    int
    批量按主键更新非空字段
    boolean
    新增或更新
    boolean
    新增或更新非空字段
    boolean
    新增非空字段
    boolean
    save(T entity)
    插入一条记录(选择字段,策略插入)
    boolean
    saveBatch(Collection<T> entityList)
    插入(批量)
    boolean
    saveBatch(Collection<T> entityList, int batchSize)
    插入(批量)
    boolean
    saveOrUpdate(T entity)
    TableId 注解存在更新记录,否插入一条记录
    boolean
    批量修改插入
    boolean
    saveOrUpdateBatch(Collection<T> entityList, int batchSize)
    批量修改插入
    boolean
    根据ID 批量更新
    boolean
    updateBatchById(Collection<T> entityList, int batchSize)
    根据ID 批量更新
    boolean
    updateById(T entity)
    根据 ID 选择修改
    boolean
    按主键更新非空值字段

    从类继承的方法 com.baomidou.mybatisplus.extension.service.impl.ServiceImpl

    closeSqlSession, currentMapperClass, currentModelClass, executeBatch, executeBatch, executeBatch, getBaseMapper, getEntityClass, getMap, getMapperClass, getObj, getOne, getOneOpt, getSqlSessionFactory, getSqlStatement, removeBatchByIds, removeBatchByIds, removeById, retBool, sqlSessionBatch, sqlStatement

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    从接口继承的方法 com.baomidou.mybatisplus.extension.service.IService

    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, removeBatchByIds, removeBatchByIds, removeBatchByIds, removeBatchByIds, removeById, removeById, removeById, removeByIds, removeByIds, removeByMap, saveOrUpdate, update, update, update
  • 构造器详细资料

    • ComServiceImpl

      public ComServiceImpl()
  • 方法详细资料

    • batchInsert

      public int batchInsert(Collection<T> list)
      从接口复制的说明: ComService

      批量保存

      by perccyking
      指定者:
      batchInsert 在接口中 ComService<M extends ComMapper<T>>
      参数:
      list - : 实体集合
      返回:
      引用无效
      int
      批量插入数量
    • batchUpdate

      public int batchUpdate(Collection<T> list)
      从接口复制的说明: ComService

      批量按主键更新

      by perccyking
      指定者:
      batchUpdate 在接口中 ComService<M extends ComMapper<T>>
      参数:
      list - : 实体集合
      返回:
      引用无效
      int
      批量更新数量
    • batchUpdateSelective

      public int batchUpdateSelective(Collection<T> list)
      从接口复制的说明: ComService

      批量按主键更新非空字段

      by perccyking
      指定者:
      batchUpdateSelective 在接口中 ComService<M extends ComMapper<T>>
      参数:
      list - : 实体集合
      返回:
      引用无效
      int
      更新数量
    • insertOrUpdateById

      public boolean insertOrUpdateById(T t)
      从接口复制的说明: ComService

      新增或更新

      by perccyking
      指定者:
      insertOrUpdateById 在接口中 ComService<M extends ComMapper<T>>
      参数:
      t - : 实体
      返回:
      引用无效
      boolean
      是否成功
    • insertOrUpdateSelective

      public boolean insertOrUpdateSelective(T t)
      从接口复制的说明: ComService

      新增或更新非空字段

      by perccyking
      指定者:
      insertOrUpdateSelective 在接口中 ComService<M extends ComMapper<T>>
      参数:
      t - : 实体
      返回:
      引用无效
      boolean
      是否成功
    • insertSelective

      public boolean insertSelective(T entity)
      从接口复制的说明: ComService

      新增非空字段

      by perccyking
      指定者:
      insertSelective 在接口中 ComService<M extends ComMapper<T>>
      参数:
      entity - : 实体
      返回:
      引用无效
      boolean
      是否成功
    • updateSelectiveByPrimaryKey

      public boolean updateSelectiveByPrimaryKey(T entity)
      从接口复制的说明: ComService

      按主键更新非空值字段

      by perccyking
      指定者:
      updateSelectiveByPrimaryKey 在接口中 ComService<M extends ComMapper<T>>
      参数:
      entity - : 实体
      返回:
      引用无效
      boolean
      是否成功
    • save

      public boolean save(T entity)
      插入一条记录(选择字段,策略插入)
      指定者:
      save 在接口中 ComService<M extends ComMapper<T>>
      指定者:
      save 在接口中 com.baomidou.mybatisplus.extension.service.IService<M extends ComMapper<T>>
      参数:
      entity - 实体对象
    • saveBatch

      @Transactional(rollbackFor=java.lang.Exception.class) public boolean saveBatch(Collection<T> entityList)
      插入(批量)
      指定者:
      saveBatch 在接口中 ComService<M extends ComMapper<T>>
      指定者:
      saveBatch 在接口中 com.baomidou.mybatisplus.extension.service.IService<M extends ComMapper<T>>
      参数:
      entityList - 实体对象集合
    • saveBatch

      public boolean saveBatch(Collection<T> entityList, int batchSize)
      插入(批量)
      指定者:
      saveBatch 在接口中 ComService<M extends ComMapper<T>>
      指定者:
      saveBatch 在接口中 com.baomidou.mybatisplus.extension.service.IService<M extends ComMapper<T>>
      覆盖:
      saveBatch 在类中 com.baomidou.mybatisplus.extension.service.impl.ServiceImpl<M extends ComMapper<T>,T>
      参数:
      entityList - 实体对象集合
      batchSize - 插入批次数量
    • saveOrUpdateBatch

      @Transactional(rollbackFor=java.lang.Exception.class) public boolean saveOrUpdateBatch(Collection<T> entityList)
      批量修改插入
      指定者:
      saveOrUpdateBatch 在接口中 ComService<M extends ComMapper<T>>
      指定者:
      saveOrUpdateBatch 在接口中 com.baomidou.mybatisplus.extension.service.IService<M extends ComMapper<T>>
      参数:
      entityList - 实体对象集合
    • saveOrUpdateBatch

      public boolean saveOrUpdateBatch(Collection<T> entityList, int batchSize)
      批量修改插入
      指定者:
      saveOrUpdateBatch 在接口中 ComService<M extends ComMapper<T>>
      指定者:
      saveOrUpdateBatch 在接口中 com.baomidou.mybatisplus.extension.service.IService<M extends ComMapper<T>>
      覆盖:
      saveOrUpdateBatch 在类中 com.baomidou.mybatisplus.extension.service.impl.ServiceImpl<M extends ComMapper<T>,T>
      参数:
      entityList - 实体对象集合
      batchSize - 每次的数量
    • updateById

      public boolean updateById(T entity)
      根据 ID 选择修改
      指定者:
      updateById 在接口中 ComService<M extends ComMapper<T>>
      指定者:
      updateById 在接口中 com.baomidou.mybatisplus.extension.service.IService<M extends ComMapper<T>>
      参数:
      entity - 实体对象
    • updateBatchById

      @Transactional(rollbackFor=java.lang.Exception.class) public boolean updateBatchById(Collection<T> entityList)
      根据ID 批量更新
      指定者:
      updateBatchById 在接口中 ComService<M extends ComMapper<T>>
      指定者:
      updateBatchById 在接口中 com.baomidou.mybatisplus.extension.service.IService<M extends ComMapper<T>>
      参数:
      entityList - 实体对象集合
    • updateBatchById

      public boolean updateBatchById(Collection<T> entityList, int batchSize)
      根据ID 批量更新
      指定者:
      updateBatchById 在接口中 ComService<M extends ComMapper<T>>
      指定者:
      updateBatchById 在接口中 com.baomidou.mybatisplus.extension.service.IService<M extends ComMapper<T>>
      覆盖:
      updateBatchById 在类中 com.baomidou.mybatisplus.extension.service.impl.ServiceImpl<M extends ComMapper<T>,T>
      参数:
      entityList - 实体对象集合
      batchSize - 更新批次数量
    • saveOrUpdate

      public boolean saveOrUpdate(T entity)
      TableId 注解存在更新记录,否插入一条记录
      指定者:
      saveOrUpdate 在接口中 ComService<M extends ComMapper<T>>
      指定者:
      saveOrUpdate 在接口中 com.baomidou.mybatisplus.extension.service.IService<M extends ComMapper<T>>
      覆盖:
      saveOrUpdate 在类中 com.baomidou.mybatisplus.extension.service.impl.ServiceImpl<M extends ComMapper<T>,T>
      参数:
      entity - 实体对象