Note | mapper | service | Note |
---|---|---|---|
DDML | Further packages: The query get a single line, remove delete, list a set of queries, page pagination | ||
int insert(T entity); | boolean save(T entity); | Select the field, strategy insert | |
boolean saveBatch(Collection
|
Bulk Insert | ||
boolean saveOrUpdateBatch(Collection
|
|||
int deleteById(Serializable id); | boolean removeById(Serializable id); | ||
According entity deletion condition | int delete(Wrapper
|
boolean remove(Wrapper
|
No corresponding record returns true |
columnMap delete condition | int deleteByMap(Map<String, Object> columnMap); | boolean removeByMap(Map<String, Object> columnMap); | Field map object columnMap |
int updateById(T entity); | boolean updateById(T entity); | ||
boolean saveOrUpdate(T entity); | |||
T selectById(Serializable id); | T getById(Serializable id); | ||
columnMap query | List
|
Collection
|
|
If a non-unique logic required wrapper.last ( "limit 1") is provided Uniqueness |
T selectOne(Wrapper
|
T getOne(Wrapper
|
Taking a plurality of |
Integer selectCount(Wrapper
|
int count(Wrapper
|
||
List
|
List
|
||
Only query a field List <Object> cols; List <String> L = (List) cols; |
List<Object> selectObjs(Wrapper
|
List<Object> listObjs(Wrapper
|
According Wrapper conditions, query all records |
IPage
|
IPage
|
MyBatis-Plus BaseMapper and IService Manual
Guess you like
Origin www.cnblogs.com/andea/p/11601367.html
Ranking