---
title: "1. 根据id查询详情-redis缓存"
docId: "968031902915272704"
source: "https://weapp.eteams.cn/build/techdoc/wdoc/index.html#/public/repository/91f5067f-775e-48f4-93a2-ce84ca0b9c2e/doc/968031902915272704"
---
# 单条查询

```java
com.weaver.common.hrm.manage.HrmComInfoCacheHandler#getCacheById 
```

# 批量查询

com.weaver.common.hrm.manage.HrmComInfoCacheHandler#getCacheList(java.lang.Class, java.util.Set)

## 入参说明（Class<T>）

- com.weaver.common.hrm.cache.HrmEmployeeComInfo  人员信息；字段与人员表一直，具体看 [表结构](https://weapp.eteams.cn/sp/techdoc/doc/dd31af4d-e86f-4b50-9957-80e891e3ac2d/freepass)

## 调用示例

```java
 HrmComInfoCacheHandler handler = I18nContextUtil.getBean(HrmComInfoCacheHandler.class);

 HrmEmployeeComInfo currInfo = hrmComInfoCacheHandler.getCacheById(HrmEmployeeComInfo.class,3042373645300420447l);
```

- 删除缓存

```java
com.weaver.common.cache.tablecache.impl.ComInfoCache#removeCacheById(java.lang.Class, java.lang.Object)
```

- 参数说明

| 名称 | 类型 | 说明 |
| --- | --- | --- |
| class | Class | 缓存bean类类型 |
| id | Object | 数据id |

- 缓存bean类类型(Class) 相关bean字段说明看 [表结构说明](https://weapp.eteams.cn/build/techdoc/wdoc/index.html#/public/repository/8eac53f9-0c8b-45ae-9138-d6089a3f97e4/home)
  
    - com.weaver.common.hrm.cache.HrmEmployeeComInfo 人员
    - com.weaver.common.hrm.cache.HrmEmployeeExtensionComInfo 人员扩展信息
    - com.weaver.common.hrm.cache.HrmAvatarComInfo 人员头像
    - com.weaver.common.hrm.cache.HrmChannelComInfo 群组
    - com.weaver.common.hrm.cache.HrmCompanyVirtualComInfo 多维维度
    - com.weaver.common.hrm.cache.HrmDepartmentComInfo 部门
    - com.weaver.common.hrm.cache.HrmExtraOrgComInfo 兼职
    - com.weaver.common.hrm.cache.HrmGradeComInfo 职级
    - com.weaver.common.hrm.cache.HrmPositionComInfo 岗位
