Package top.tangyh.basic.base.manager
Interface SuperManager<T>
- Type Parameters:
T- 实体
- All Superinterfaces:
com.baomidou.mybatisplus.extension.repository.IRepository<T>,com.baomidou.mybatisplus.extension.service.IService<T>
- All Known Subinterfaces:
SuperCacheManager<T>
- All Known Implementing Classes:
SuperCacheManagerImpl,SuperManagerImpl
public interface SuperManager<T>
extends com.baomidou.mybatisplus.extension.service.IService<T>
基于MP的 IService 新增了2个方法: saveBatchSomeColumn、updateAllById
其中:
1,updateAllById 执行后,会清除缓存
2,saveBatchSomeColumn 批量插入
- Author:
- zuihou
-
Field Summary
Fields inherited from interface com.baomidou.mybatisplus.extension.repository.IRepository
DEFAULT_BATCH_SIZE -
Method Summary
Modifier and TypeMethodDescription获取实体的类型default booleansaveBatchSomeColumn(List<T> entityList) 批量保存数据booleanupdateAllById(T entity) 根据id修改 entity 的所有字段Methods inherited from interface com.baomidou.mybatisplus.extension.repository.IRepository
count, count, exists, getBaseMapper, getById, 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, updateByIdMethods inherited from interface com.baomidou.mybatisplus.extension.service.IService
removeBatchByIds, saveBatch, saveOrUpdateBatch, updateBatchById
-
Method Details
-
getEntityClass
获取实体的类型- Specified by:
getEntityClassin interfacecom.baomidou.mybatisplus.extension.repository.IRepository<T>- Returns:
-
saveBatchSomeColumn
批量保存数据注意:该方法仅仅测试过mysql
- Parameters:
entityList-- Returns:
-
updateAllById
根据id修改 entity 的所有字段- Parameters:
entity-- Returns:
-