---
title: "3.1 分部、部门浏览按钮"
docId: "278747937155055616"
source: "https://weapp.eteams.cn/build/techdoc/wdoc/index.html#/public/repository/91f5067f-775e-48f4-93a2-ce84ca0b9c2e/doc/278747937155055616"
---
### 1. 入参拦截

- 二开标识
  
  ```java
  部门浏览按钮：HRM_DEPARTMENT_001
  分部浏览按钮：HRM_SUBCOMPANY_001
  ```
  
    - 入参说明（Map<String, Object>，从request中获取 params）
      
      | 参数 | 类型 | 说明 |
      | --- | --- | --- |
      | disableAppDetach | boolean | 禁用组织应用分权 |
      | cmd | string | 来源： tree 组织架构， degroup 部门组 recently 最近 其他内容： 搜索或者自定义页签搜索 |
    - 出参说明，在result中提供 params；内容是想要覆盖的内容`
- 示例
  
  ```java
   @Override
      public WeaHookResponse handle(WeaHookRequest request, WeaHookResponse response, AppInfo appInfo) throws Exception {
          Map<String, Object> params = request.getParams();
          ObjectMapper objectMapper = new ObjectMapper() ;
          Map<String, Object> paramMap = objectMapper.convertValue(
                  params.get("params"), new TypeReference<Map<String, Object>>() {}
          );
          HashMap<Object, Object> result = new HashMap<>();
          Map<String,Object> mergeMap = new HashMap<>() ;
          result.put("params",mergeMap) ;
          if("recently".equalsIgnoreCase(Util.null2String(paramMap.get("cmd")))){
              mergeMap.put("disableAppDetach",true) ; // 取消组织应用分权限制
          }
          response.setResult(result);
          return response;
      }
  ```
