feat(integration-connector): database 传输类型、两步绑定编排与调用日志捕获查询

- 新增 database 传输:直连 MySQL/Oracle/SQLServer/PostgreSQL 执行绑定 SQL(新增 pymysql/pymssql 驱动依赖)
- 绑定支持 steps_json 多步编排:每步独立传输调用与审计,无 steps 的既有绑定走单步兼容路径
- 客户端实例校验 connector_type ∈ rest/soap/database,database 强制 db_kind 白名单,非 database 置空
- 三个传输层捕获线级事实(最终 SQL/渲染后 XML/原始响应)随调用记录落库,引擎可选透传 business_ref 业务锚点
- 新增调用日志查询 API(列表/详情/同 operation 步骤时间线,仅管理员)与管理端「调用日志」tab:筛选、双栏对照、外部工具复现命令
- 迁移 tt7a/tta9/tt5b:连接器类型枚举、绑定 steps_json、放开 calls 操作唯一约束
- 说明:wire_json 列迁移挂链尾(依赖域表迁移),随后续批次单独落地
This commit is contained in:
hugo committed 2026-09-27 18:05:08 +08:00
1 parent 8a814e7152
commit e750fa8602
47 files changed
+7441 -353

No files matched your search

+72 -8
View File
@@ -5161,7 +5161,8 @@
"interface": "Interface Definitions",
"binding": "Bindings",
"credential": "Credential References",
"capability": "Capabilities"
"capability": "Capabilities",
"calls": "Call logs"
},
"statusLabels": {
"draft": "Draft",
@@ -5212,7 +5213,7 @@
"environment": "Environment",
"status": "Status",
"clientInstance": "Client Instance",
"interfaceDef": "Interface",
"interfaceDef": "Interface Steps (ordered)",
"secretRef": "Secret Reference",
"secretProvider": "Source",
"account": "Account",
@@ -5227,6 +5228,7 @@
"code": "Code",
"name": "Name",
"connectorType": "Connector Type",
"dbKind": "Database kind (db_kind)",
"environment": "Environment",
"credentialRef": "Credential Reference Code",
"configJson": "Connection Config JSON (endpoint / timeout / default org, etc.)",
@@ -5248,9 +5250,6 @@
"effectiveTo": "Effective To",
"contextSelector": "Advanced Routing Conditions JSON",
"contextSelectorHint": "All key-value pairs must be contained in the call context to match; callers currently send no routing context, so leave it empty for the default binding.",
"paramMapping": "Parameter Mapping JSON",
"paramMappingHint": "Translation rules from domain params to interface params (e.g. erp_org to organization, condition template); leave empty for same-name passthrough.",
"bindingClientHint": "Derived and locked from the selected interface definition; not editable separately.",
"secretRef": "Secret Reference Key",
"secretProvider": "Secret Source",
"credentialType": "Credential Type",
@@ -5278,7 +5277,8 @@
"msg": {
"fillClient": "Please fill in the name",
"fillInterface": "Please select a client instance (the code can be auto-generated)",
"fillBinding": "Please fill in the capability, client instance and interface definition",
"fillBinding": "Please fill in the capability and add at least one step (choose an interface per step)",
"fillDbKind": "Please choose a database kind (MySQL / Oracle / SQL Server / PostgreSQL)",
"fillCredential": "Please fill in the code and the secret reference",
"fillCredentialDb": "Please fill in the code and the required credential fields: {fields}",
"credentialTypeMissing": "Credential type list not loaded, please refresh and retry",
@@ -5313,7 +5313,8 @@
"endpoint": "https://erp-api.example.com/ws",
"wsdl": "https://erp-api.example.com/wsdl",
"requestPath": "Path supports placeholders, e.g. /transfer/xxx",
"passwordKeep": "Leave blank to keep the current password"
"passwordKeep": "Leave blank to keep the current password",
"database": "erp-host:1521/ORCL or 127.0.0.1:3306/dbname"
},
"advancedConfig": "Advanced Config (JSON)",
"formatJson": "Format",
@@ -5334,7 +5335,70 @@
},
"connectorTypes": {
"rest": "REST API",
"soap": "SOAP Service"
"soap": "SOAP Service",
"database": "Database (Direct)"
},
"connectorDbKind": {
"mysql": "MySQL",
"oracle": "Oracle",
"sqlserver": "SQL Server",
"postgresql": "PostgreSQL"
},
"endpointLabel": {
"database": "Database connection string (host:port/service or /database)"
},
"bindingSteps": {
"label": "Execution Steps (ordered)",
"add": "Add Step",
"remove": "Remove Step",
"moveUp": "Move Up",
"moveDown": "Move Down",
"interface": "Interface Definition",
"paramMapping": "Step {index} Parameter Mapping JSON",
"clientHint": "Client instance is derived from this step's interface: {client}",
"hint": "Steps run in array order; each step has its own parameter mapping, and the client instance comes with each step's interface."
},
"callLogs": {
"title": "Call records",
"filterInterface": "Interface",
"filterClient": "Client code",
"filterConnector": "Connector type",
"filterStatus": "Status",
"filterOperationId": "Operation ID",
"filterTraceId": "Trace ID",
"filterBusinessRef": "Business ref",
"filterKeyword": "Keyword in request",
"dateFrom": "Time from",
"dateTo": "Time to",
"query": "Query",
"reset": "Reset",
"colTime": "Time",
"colCapability": "Capability",
"colInterface": "Interface",
"colRef": "Ref",
"colStep": "Step",
"colStatus": "Status",
"colElapsed": "Elapsed",
"detailTitle": "Call detail",
"timeline": "Step timeline",
"request": "Request",
"response": "Response",
"wire": "Wire-level request",
"rawPayload": "Raw payload",
"normalized": "Business params (normalized)",
"normalizedJson": "Normalized JSON",
"copyBody": "Copy body",
"copyCurl": "Copy curl",
"copySql": "Copy SQL",
"copyRaw": "Copy raw payload",
"copyJson": "Copy JSON",
"copyOperationId": "Copy operation_id",
"copyTraceId": "Copy trace_id",
"copied": "Copied",
"noWire": "No wire details (historical record)",
"sqlWriteWarning": "⚠ Write statements: confirm target environment before executing",
"prevPage": "Previous page",
"nextPage": "Next page"
}
}
}