update mq controller
This commit is contained in:
@@ -12,6 +12,242 @@
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/api/v1/failed-messages": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Failed Messages"
|
||||
],
|
||||
"summary": "失败消息列表",
|
||||
"description": "获取 Consumer 处理失败的消息列表,支持分页、按数据类型/平台/时间筛选。仅 admin 可访问。",
|
||||
"operationId": "6dac9bdff8b35f75565ed5c6b8638937",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "page",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "per_page",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"default": 15,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "data_type",
|
||||
"in": "query",
|
||||
"description": "数据类型精确筛选(order/product/refund)",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"order",
|
||||
"product",
|
||||
"refund"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "platform_id",
|
||||
"in": "query",
|
||||
"description": "平台 ID 精确筛选",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "error_type",
|
||||
"in": "query",
|
||||
"description": "异常类名模糊搜索",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "failed_at_from",
|
||||
"in": "query",
|
||||
"description": "失败时间起始(含)",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "date",
|
||||
"example": "2026-01-01"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "failed_at_to",
|
||||
"in": "query",
|
||||
"description": "失败时间截止(含)",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "date",
|
||||
"example": "2026-12-31"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "获取成功",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"example": 0
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"example": "获取成功"
|
||||
},
|
||||
"data": {
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/FailedMessageList"
|
||||
}
|
||||
},
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"example": 100
|
||||
},
|
||||
"page": {
|
||||
"type": "integer",
|
||||
"example": 1
|
||||
},
|
||||
"per_page": {
|
||||
"type": "integer",
|
||||
"example": 15
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "未认证",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "无权限",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/failed-messages/{id}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Failed Messages"
|
||||
],
|
||||
"summary": "失败消息详情",
|
||||
"description": "获取失败消息详情,含完整错误堆栈和原始消息体。仅 admin 可访问。",
|
||||
"operationId": "4f6b7410222ebc0fa65afdc1d168c15a",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"description": "失败消息 ID",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "获取成功",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"example": 0
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"example": "获取成功"
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/FailedMessageDetail"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "未认证",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "无权限",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "数据不存在",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/mq/status": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -6733,6 +6969,154 @@
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"FailedMessageList": {
|
||||
"description": "失败消息列表项",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"example": 1
|
||||
},
|
||||
"error_id": {
|
||||
"type": "string",
|
||||
"example": "err_67890abc"
|
||||
},
|
||||
"data_type": {
|
||||
"type": "string",
|
||||
"example": "order",
|
||||
"enum": [
|
||||
"order",
|
||||
"product",
|
||||
"refund"
|
||||
]
|
||||
},
|
||||
"platform": {
|
||||
"type": "string",
|
||||
"example": "Tmall",
|
||||
"nullable": true
|
||||
},
|
||||
"platform_id": {
|
||||
"type": "integer",
|
||||
"example": 1,
|
||||
"nullable": true
|
||||
},
|
||||
"company_id": {
|
||||
"type": "integer",
|
||||
"example": 1,
|
||||
"nullable": true
|
||||
},
|
||||
"store_id": {
|
||||
"type": "integer",
|
||||
"example": 1,
|
||||
"nullable": true
|
||||
},
|
||||
"error_type": {
|
||||
"type": "string",
|
||||
"example": "RuntimeException"
|
||||
},
|
||||
"error_message": {
|
||||
"type": "string",
|
||||
"example": "Connection refused"
|
||||
},
|
||||
"retry_count": {
|
||||
"type": "integer",
|
||||
"example": 3
|
||||
},
|
||||
"message_id": {
|
||||
"type": "string",
|
||||
"example": "msg_12345",
|
||||
"nullable": true
|
||||
},
|
||||
"failed_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"FailedMessageDetail": {
|
||||
"description": "失败消息详情(含完整错误堆栈和原始消息体)",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"example": 1
|
||||
},
|
||||
"error_id": {
|
||||
"type": "string",
|
||||
"example": "err_67890abc"
|
||||
},
|
||||
"data_type": {
|
||||
"type": "string",
|
||||
"example": "order",
|
||||
"enum": [
|
||||
"order",
|
||||
"product",
|
||||
"refund"
|
||||
]
|
||||
},
|
||||
"platform": {
|
||||
"type": "string",
|
||||
"example": "Tmall",
|
||||
"nullable": true
|
||||
},
|
||||
"platform_id": {
|
||||
"type": "integer",
|
||||
"example": 1,
|
||||
"nullable": true
|
||||
},
|
||||
"company_id": {
|
||||
"type": "integer",
|
||||
"example": 1,
|
||||
"nullable": true
|
||||
},
|
||||
"store_id": {
|
||||
"type": "integer",
|
||||
"example": 1,
|
||||
"nullable": true
|
||||
},
|
||||
"error_type": {
|
||||
"type": "string",
|
||||
"example": "RuntimeException"
|
||||
},
|
||||
"error_message": {
|
||||
"type": "string",
|
||||
"example": "Connection refused"
|
||||
},
|
||||
"error_code": {
|
||||
"type": "integer",
|
||||
"example": 0
|
||||
},
|
||||
"error_trace": {
|
||||
"description": "完整异常堆栈",
|
||||
"type": "string"
|
||||
},
|
||||
"original_message": {
|
||||
"description": "原始消息体 JSON",
|
||||
"type": "object"
|
||||
},
|
||||
"retry_count": {
|
||||
"type": "integer",
|
||||
"example": 3
|
||||
},
|
||||
"message_id": {
|
||||
"type": "string",
|
||||
"example": "msg_12345",
|
||||
"nullable": true
|
||||
},
|
||||
"failed_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"securitySchemes": {
|
||||
@@ -6749,6 +7133,10 @@
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "Failed Messages",
|
||||
"description": "失败消息查看"
|
||||
},
|
||||
{
|
||||
"name": "MQ Status",
|
||||
"description": "消息队列状态监控"
|
||||
|
||||
Reference in New Issue
Block a user