# API 文档 - 描述快速操作 ## 元数据 - 需求编号:001 - 子需求编号:001-01 - 接口编号:006 - 创建时间:2026-02-02 - 创建人:AI Assistant - 状态:已完成 ## 接口概述 获取对象的快速操作定义。 ## 基本信息 - **功能描述**:获取对象的快速操作定义 - **请求方式**:POST - **请求路径**:`/partner/describe/quick-actions` - **权限要求**:`@PreAuthorize("@ss.hasPermi('partner:describe:quickActions')")` ## 请求参数 ### 请求体(JSON) | 参数名 | 类型 | 必填 | 说明 | 示例值 | |--------|------|------|------|--------| | objectType | String | 否 | 对象类型(可选,如 Account、Contact) | Account | ### 请求示例 ```json { "objectType": "Account" } ``` ### 请求示例(不指定对象类型) ```json {} ``` ## 响应参数 | 参数名 | 类型 | 说明 | |--------|------|------| | code | Integer | 状态码(200 成功,其他失败) | | msg | String | 提示信息 | | data | Object | 响应数据 | | data.quickActions | Array | 快速操作描述列表 | | data.quickActions[].id | String | 快速操作 ID | | data.quickActions[].name | String | 快速操作名称 | | data.quickActions[].label | String | 快速操作标签 | | data.quickActions[].type | String | 快速操作类型(如:Create、Update、Custom) | | data.quickActions[].actionType | String | 操作类型(如:Create、Update、Delete) | | data.quickActions[].targetObject | String | 目标对象 | | data.quickActions[].targetParentField | String | 目标父字段 | | data.quickActions[].url | String | 快速操作 URL | | data.quickActions[].iconUrl | String | 图标 URL | | data.quickActions[].custom | Boolean | 是否为自定义快速操作 | | data.quickActions[].standard | Boolean | 是否为标准快速操作 | | data.success | Boolean | 是否成功 | | data.errors | Array | 错误信息列表 | ### 成功响应示例(指定对象类型) ```json { "code": 200, "msg": "操作成功", "data": { "quickActions": [ { "id": "01ixx0000000001AAA", "name": "NewAccount", "label": "New Account", "type": "Create", "actionType": "Create", "targetObject": "Account", "targetParentField": null, "url": "/001/e", "iconUrl": "/img/icon/account16.png", "custom": false, "standard": true }, { "id": "01ixx0000000002AAA", "name": "LogACall", "label": "Log a Call", "type": "Update", "actionType": "Update", "targetObject": "Task", "targetParentField": "WhatId", "url": "/00T/e", "iconUrl": "/img/icon/task16.png", "custom": false, "standard": true }, { "id": "01ixx0000000003AAA", "name": "SendEmail", "label": "Send Email", "type": "Custom", "actionType": "Custom", "targetObject": null, "targetParentField": null, "url": "/_ui/core/email/author/EmailAuthor?p2_lkid={!Account.Id}", "iconUrl": "/img/icon/email16.png", "custom": true, "standard": false } ], "success": true, "errors": null } } ``` ### 成功响应示例(不指定对象类型) ```json { "code": 200, "msg": "操作成功", "data": { "quickActions": [ { "id": "01ixx0000000001AAA", "name": "NewAccount", "label": "New Account", "type": "Create", "actionType": "Create", "targetObject": "Account", "targetParentField": null, "url": "/001/e", "iconUrl": "/img/icon/account16.png", "custom": false, "standard": true }, { "id": "01ixx0000000004AAA", "name": "NewContact", "label": "New Contact", "type": "Create", "actionType": "Create", "targetObject": "Contact", "targetParentField": null, "url": "/003/e", "iconUrl": "/img/icon/contact16.png", "custom": false, "standard": true } ], "success": true, "errors": null } } ``` ### 失败响应示例 ```json { "code": 500, "msg": "描述快速操作失败", "data": { "quickActions": null, "success": false, "errors": [ { "statusCode": "INVALID_TYPE", "message": "Invalid object type: InvalidObject" } ] } } ``` ## 错误码 | 错误码 | 说明 | 处理建议 | |--------|------|----------| | 200 | 操作成功 | - | | 400 | 请求参数错误 | 检查请求参数格式和必填项 | | 401 | 未登录或登录已过期 | 请重新登录 | | 403 | 无权限访问 | 请检查用户权限 | | 500 | 服务器内部错误 | 请联系管理员或稍后重试 | ## 注意事项 1. 如果不指定 objectType,则返回所有快速操作 2. 指定 objectType 则只返回该对象的快速操作 3. 快速操作类型包括:Create、Update、Delete、Custom 等 4. 自定义快速操作的 custom 字段为 true 5. 某些快速操作可能因为权限限制不可访问 6. 快速操作列表可能很大,建议缓存结果 ## 使用场景 - 获取对象的快速操作 - 动态生成快速操作菜单 - 验证快速操作是否存在 - 构建自定义快速操作 - 权限检查和验证 ## 相关文档 - [需求文档](../../requirements/2026-01-28-001-PartnerAPI源org实现.md) - [设计文档](../../design/2026-01-29-001-01-认证和会话管理-设计.md) - [决策记录](../../decisions/2026-01-29-001-01-ADR-认证和会话管理技术选型.md)