public class CnaWorldBaseServiceImpl<M extends CnaworldBaseMapper<T>,T> extends Object implements CnaworldBaseService<T>
| 限定符和类型 | 字段和说明 |
|---|---|
protected M |
baseMapper |
protected Class<T> |
entityClass |
protected org.apache.ibatis.logging.Log |
log |
protected Class<M> |
mapperClass |
| 构造器和说明 |
|---|
CnaWorldBaseServiceImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
closeSqlSession(org.apache.ibatis.session.SqlSession sqlSession)
已过时。
3.3.0
|
protected Class<M> |
currentMapperClass() |
protected Class<T> |
currentModelClass() |
protected <E> boolean |
executeBatch(Collection<E> list,
java.util.function.BiConsumer<org.apache.ibatis.session.SqlSession,E> consumer)
执行批量操作(默认批次提交数量
IService.DEFAULT_BATCH_SIZE) |
protected <E> boolean |
executeBatch(Collection<E> list,
int batchSize,
java.util.function.BiConsumer<org.apache.ibatis.session.SqlSession,E> consumer)
执行批量操作
|
protected boolean |
executeBatch(java.util.function.Consumer<org.apache.ibatis.session.SqlSession> consumer)
已过时。
3.3.1 后面我打算移除掉
executeBatch(Collection, int, BiConsumer) }. |
M |
getBaseMapper() |
Class<T> |
getEntityClass() |
Map<String,Object> |
getMap(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper) |
<V> V |
getObj(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper,
java.util.function.Function<? super Object,V> mapper) |
T |
getOne(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper,
boolean throwEx) |
protected String |
getSqlStatement(com.baomidou.mybatisplus.core.enums.SqlMethod sqlMethod)
获取mapperStatementId
|
protected boolean |
retBool(Integer result)
已过时。
3.3.1
|
boolean |
saveBatch(Collection<T> entityList,
int batchSize)
批量插入
|
boolean |
saveOrUpdate(T entity)
TableId 注解存在更新记录,否插入一条记录
|
boolean |
saveOrUpdateBatch(Collection<T> entityList,
int batchSize) |
protected org.apache.ibatis.session.SqlSession |
sqlSessionBatch()
已过时。
3.3.0
|
protected String |
sqlStatement(com.baomidou.mybatisplus.core.enums.SqlMethod sqlMethod)
已过时。
3.4.0
|
boolean |
updateBatchById(Collection<T> entityList,
int batchSize) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdirectRemove, directRemoveById, directRemoveByIds, directRemoveByMap, restore, restoreById, restoreByIds, restoreByMapcount, count, getById, getOne, ktQuery, ktUpdate, lambdaQuery, lambdaUpdate, list, list, listByIds, listByMap, listMaps, listMaps, listObjs, listObjs, listObjs, listObjs, page, page, pageMaps, pageMaps, query, remove, removeBatchByIds, removeBatchByIds, removeBatchByIds, removeBatchByIds, removeById, removeById, removeById, removeByIds, removeByIds, removeByMap, save, saveBatch, saveOrUpdate, saveOrUpdateBatch, update, update, update, updateBatchById, updateByIdprotected org.apache.ibatis.logging.Log log
@Autowired protected M extends CnaworldBaseMapper<T> baseMapper
protected Class<M extends CnaworldBaseMapper<T>> mapperClass
public M getBaseMapper()
getBaseMapper 在接口中 com.baomidou.mybatisplus.extension.service.IService<T>public Class<T> getEntityClass()
getEntityClass 在接口中 com.baomidou.mybatisplus.extension.service.IService<T>@Deprecated protected boolean retBool(Integer result)
result - 数据库操作返回影响条数@Deprecated protected org.apache.ibatis.session.SqlSession sqlSessionBatch()
@Deprecated protected void closeSqlSession(org.apache.ibatis.session.SqlSession sqlSession)
sqlSession - session@Deprecated protected String sqlStatement(com.baomidou.mybatisplus.core.enums.SqlMethod sqlMethod)
sqlMethod - ignoregetSqlStatement(SqlMethod)@Transactional(rollbackFor=java.lang.Exception.class) public boolean saveBatch(Collection<T> entityList, int batchSize)
saveBatch 在接口中 com.baomidou.mybatisplus.extension.service.IService<T>entityList - ignorebatchSize - ignoreprotected String getSqlStatement(com.baomidou.mybatisplus.core.enums.SqlMethod sqlMethod)
sqlMethod - 方法名@Transactional(rollbackFor=java.lang.Exception.class) public boolean saveOrUpdate(T entity)
saveOrUpdate 在接口中 com.baomidou.mybatisplus.extension.service.IService<T>entity - 实体对象@Transactional(rollbackFor=java.lang.Exception.class) public boolean saveOrUpdateBatch(Collection<T> entityList, int batchSize)
saveOrUpdateBatch 在接口中 com.baomidou.mybatisplus.extension.service.IService<T>@Transactional(rollbackFor=java.lang.Exception.class) public boolean updateBatchById(Collection<T> entityList, int batchSize)
updateBatchById 在接口中 com.baomidou.mybatisplus.extension.service.IService<T>public T getOne(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper, boolean throwEx)
getOne 在接口中 com.baomidou.mybatisplus.extension.service.IService<T>public Map<String,Object> getMap(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
getMap 在接口中 com.baomidou.mybatisplus.extension.service.IService<T>public <V> V getObj(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper, java.util.function.Function<? super Object,V> mapper)
getObj 在接口中 com.baomidou.mybatisplus.extension.service.IService<T>@Deprecated protected boolean executeBatch(java.util.function.Consumer<org.apache.ibatis.session.SqlSession> consumer)
executeBatch(Collection, int, BiConsumer) }.consumer - consumerprotected <E> boolean executeBatch(Collection<E> list, int batchSize, java.util.function.BiConsumer<org.apache.ibatis.session.SqlSession,E> consumer)
E - 泛型list - 数据集合batchSize - 批量大小consumer - 执行方法protected <E> boolean executeBatch(Collection<E> list, java.util.function.BiConsumer<org.apache.ibatis.session.SqlSession,E> consumer)
IService.DEFAULT_BATCH_SIZE)E - 泛型list - 数据集合consumer - 执行方法Copyright © 2023. All rights reserved.