feat: add order governance flags and reconciliation
This commit is contained in:
@@ -1349,6 +1349,90 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/super/v1/orders/{id}/flag": {
|
||||
"post": {
|
||||
"description": "Flag or unflag an order as problematic",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Order"
|
||||
],
|
||||
"summary": "Flag order",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "Order ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "Flag form",
|
||||
"name": "form",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.SuperOrderFlagForm"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/super/v1/orders/{id}/reconcile": {
|
||||
"post": {
|
||||
"description": "Mark or unmark order reconciliation status",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Order"
|
||||
],
|
||||
"summary": "Reconcile order",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "Order ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "Reconcile form",
|
||||
"name": "form",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.SuperOrderReconcileForm"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/super/v1/orders/{id}/refund": {
|
||||
"post": {
|
||||
"description": "Refund order",
|
||||
@@ -8734,6 +8818,19 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SuperOrderFlagForm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"is_flagged": {
|
||||
"description": "IsFlagged 是否标记为问题订单。",
|
||||
"type": "boolean"
|
||||
},
|
||||
"reason": {
|
||||
"description": "Reason 标记原因(标记为问题时必填)。",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SuperOrderItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -8769,10 +8866,30 @@ const docTemplate = `{
|
||||
}
|
||||
]
|
||||
},
|
||||
"flag_reason": {
|
||||
"description": "FlagReason 问题标记原因。",
|
||||
"type": "string"
|
||||
},
|
||||
"flagged_at": {
|
||||
"description": "FlaggedAt 标记时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"flagged_by": {
|
||||
"description": "FlaggedBy 标记操作者ID。",
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"description": "ID 订单ID。",
|
||||
"type": "integer"
|
||||
},
|
||||
"is_flagged": {
|
||||
"description": "IsFlagged 是否标记为问题订单。",
|
||||
"type": "boolean"
|
||||
},
|
||||
"is_reconciled": {
|
||||
"description": "IsReconciled 是否完成对账。",
|
||||
"type": "boolean"
|
||||
},
|
||||
"items": {
|
||||
"description": "Items 订单明细行,用于展示具体内容与金额拆分。",
|
||||
"type": "array",
|
||||
@@ -8784,6 +8901,18 @@ const docTemplate = `{
|
||||
"description": "PaidAt 支付时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"reconcile_note": {
|
||||
"description": "ReconcileNote 对账说明。",
|
||||
"type": "string"
|
||||
},
|
||||
"reconciled_at": {
|
||||
"description": "ReconciledAt 对账时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"reconciled_by": {
|
||||
"description": "ReconciledBy 对账操作者ID。",
|
||||
"type": "integer"
|
||||
},
|
||||
"refunded_at": {
|
||||
"description": "RefundedAt 退款时间(RFC3339)。",
|
||||
"type": "string"
|
||||
@@ -8845,6 +8974,19 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SuperOrderReconcileForm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"is_reconciled": {
|
||||
"description": "IsReconciled 是否完成对账。",
|
||||
"type": "boolean"
|
||||
},
|
||||
"note": {
|
||||
"description": "Note 对账说明(可选)。",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SuperOrderRefundForm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user