public class MapServiceImpl<M extends com.baomidou.mybatisplus.core.mapper.BaseMapper<T>,T extends com.baomidou.mybatisplus.extension.activerecord.Model<T>>
extends com.baomidou.mybatisplus.extension.service.impl.ServiceImpl<M,T>
| Constructor and Description |
|---|
MapServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
Map<Serializable,T> |
map()
查询集合转化为Map
|
Map<Serializable,T> |
map(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
查询集合转化为Map
默认使用主键作为key的转换规则
集合元素实体作为转换规则
|
<K,V> Map<K,V> |
map(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper,
Function<? super T,? extends K> key,
Function<? super T,? extends V> value)
查询集合转化为Map
|
<V> Map<Serializable,V> |
map(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper,
Function<? super T,? extends V> value)
查询集合转化为Map
|
Map<Serializable,T> |
mapByIds(Collection<? extends Serializable> idList)
查询集合转化为Map
|
<K,V> Map<K,V> |
mapByIds(Collection<? extends Serializable> idList,
Function<? super T,? extends K> key,
Function<? super T,? extends V> value)
查询集合转化为Map,支持自定义Value类型
|
<V> Map<Serializable,V> |
mapByIds(Collection<? extends Serializable> idList,
Function<? super T,? extends V> value)
查询集合转化为Map,支持自定义Value类型
默认使用表的主键作为Key
|
closeSqlSession, currentMapperClass, currentModelClass, executeBatch, executeBatch, executeBatch, getBaseMapper, getEntityClass, getMap, getObj, getOne, getSqlStatement, retBool, saveBatch, saveOrUpdate, saveOrUpdateBatch, sqlSessionBatch, sqlStatement, updateBatchByIdclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcount, count, getById, getOne, ktQuery, ktUpdate, lambdaQuery, lambdaUpdate, list, list, listByIds, listByMap, listMaps, listMaps, listObjs, listObjs, listObjs, listObjs, page, page, pageMaps, pageMaps, query, remove, removeById, removeById, removeByIds, removeByMap, save, saveBatch, saveOrUpdate, saveOrUpdateBatch, update, update, update, updateBatchById, updateByIdpublic Map<Serializable,T> mapByIds(Collection<? extends Serializable> idList)
idList - 主键ID集合public <V> Map<Serializable,V> mapByIds(Collection<? extends Serializable> idList, Function<? super T,? extends V> value)
V - 转换实体泛型idList - 主键ID集合value - 转换规则public <K,V> Map<K,V> mapByIds(Collection<? extends Serializable> idList, Function<? super T,? extends K> key, Function<? super T,? extends V> value)
V - 转换实体泛型idList - 主键ID集合key - key转换规则value - value转换规则public Map<Serializable,T> map(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper)
queryWrapper - 查询条件public <V> Map<Serializable,V> map(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper, Function<? super T,? extends V> value)
V - 转换实体泛型queryWrapper - 查询条件value - 转换规则public <K,V> Map<K,V> map(com.baomidou.mybatisplus.core.conditions.Wrapper<T> queryWrapper, Function<? super T,? extends K> key, Function<? super T,? extends V> value)
V - 转换实体泛型queryWrapper - 查询条件key - key转换规则value - value转换规则public Map<Serializable,T> map()
Copyright © 2021. All rights reserved.