{
  "openapi": "3.0.3",
  "info": {
    "title": "OpenAPI 接口 - 按用户 ID 查询展示名",
    "version": "1.0.0",
    "description": "OpenAPI 接口相关接口文档"
  },
  "paths": {
    "/openapi/accounts/display-names": {
      "post": {
        "summary": "按用户 ID 查询展示名",
        "description": "先校验 Authorization 中的登录访问令牌，再在当前 X-Site 对应的数据库中，按传入的用户主键列表查询系统用户（users）或客户端用户（clientUsers）的展示名。默认库多站点场景仅返回 siteKey 与当前 X-Site 一致且 status=1 的记录；独立站点库仅按 id 与 status 匹配。列表中未找到的 id 不会出现在结果中；全部未命中时 data.list 为空数组。",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "会员登录接口返回的访问令牌，格式为 Bearer TOKEN（与 memberships/login 一致，需含 phone 等字段的混合 JWT）",
            "example": "Bearer {token}"
          },
          {
            "name": "X-Site",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "站点标识，决定查询所用的数据库上下文（与全局 OpenAPI 中间件一致）"
          },
          {
            "name": "X-System-Code",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "系统编码，与其他 OpenAPI 接口一致，用于校验系统是否开放"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userIds": {
                    "type": "array",
                    "description": "array｜选填，用户主键列表（_id 字符串或数字 id），最多 200 个；可省略或传 []，鉴权成功后返回空列表"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "example": {
                  "success": {
                    "code": "0000",
                    "message": "查询成功",
                    "data": {
                      "list": [
                        {
                          "_id": "MNFIOHH6QOA3kg0z",
                          "username": "张三"
                        },
                        {
                          "_id": 12,
                          "username": "李四"
                        }
                      ]
                    }
                  },
                  "failure": {
                    "code": "1001",
                    "message": "缺少访问令牌",
                    "data": null
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}