M - MapperT - 实体public class SuperServiceImpl<M extends SuperMapper<T>,T> extends com.baomidou.mybatisplus.extension.service.impl.ServiceImpl<M,T> implements SuperService<T>
2,removeById:重写 ServiceImpl 类的方法,删除db 3,removeByIds:重写 ServiceImpl 类的方法,删除db 4,updateAllById: 新增的方法: 修改数据(所有字段) 5,updateById:重写 ServiceImpl 类的方法,修改db后
| 构造器和说明 |
|---|
SuperServiceImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
Class<T> |
getEntityClass()
获取实体的类型
|
SuperMapper |
getSuperMapper() |
protected R<Boolean> |
handlerSave(T model)
处理新增相关处理
|
protected R<Boolean> |
handlerUpdateAllById(T model)
处理修改相关处理
|
protected R<Boolean> |
handlerUpdateById(T model)
处理修改相关处理
|
boolean |
save(T model) |
boolean |
updateAllById(T model)
根据id修改 entity 的所有字段
|
boolean |
updateById(T model) |
closeSqlSession, currentMapperClass, currentModelClass, executeBatch, executeBatch, executeBatch, getBaseMapper, getMap, getObj, getOne, getSqlStatement, retBool, saveBatch, saveOrUpdate, saveOrUpdateBatch, sqlSessionBatch, sqlStatement, updateBatchByIdclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsaveBatchSomeColumncount, count, getBaseMapper, getById, getMap, getObj, getOne, getOne, ktQuery, ktUpdate, lambdaQuery, lambdaUpdate, list, list, listByIds, listByMap, listMaps, listMaps, listObjs, listObjs, listObjs, listObjs, page, page, pageMaps, pageMaps, query, remove, removeById, removeByIds, removeByMap, saveBatch, saveBatch, saveOrUpdate, saveOrUpdate, saveOrUpdateBatch, saveOrUpdateBatch, update, update, update, updateBatchById, updateBatchByIdpublic SuperMapper getSuperMapper()
public Class<T> getEntityClass()
SuperServicegetEntityClass 在接口中 com.baomidou.mybatisplus.extension.service.IService<T>getEntityClass 在接口中 SuperService<T>getEntityClass 在类中 com.baomidou.mybatisplus.extension.service.impl.ServiceImpl<M extends SuperMapper<T>,T>@Transactional(rollbackFor=java.lang.Exception.class) public boolean save(T model)
save 在接口中 com.baomidou.mybatisplus.extension.service.IService<T>protected R<Boolean> handlerUpdateAllById(T model)
model - 实体@Transactional(rollbackFor=java.lang.Exception.class) public boolean updateAllById(T model)
SuperServiceupdateAllById 在接口中 SuperService<T>@Transactional(rollbackFor=java.lang.Exception.class) public boolean updateById(T model)
updateById 在接口中 com.baomidou.mybatisplus.extension.service.IService<T>Copyright © 2021. All rights reserved.