feat: add coupon risk review

This commit is contained in:
2026-01-15 17:01:36 +08:00
parent c8ec0af07f
commit ba1d120c84
10 changed files with 1255 additions and 8 deletions

View File

@@ -398,6 +398,58 @@ const docTemplate = `{
}
}
},
"/super/v1/coupon-risks": {
"get": {
"description": "List coupon risk records across tenants",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Coupon"
],
"summary": "List coupon risks",
"parameters": [
{
"type": "integer",
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/requests.Pager"
},
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.SuperCouponRiskItem"
}
}
}
}
]
}
}
}
}
},
"/super/v1/coupons": {
"get": {
"description": "List coupon templates across tenants",
@@ -7326,6 +7378,95 @@ const docTemplate = `{
}
}
},
"dto.SuperCouponRiskItem": {
"type": "object",
"properties": {
"coupon_id": {
"description": "CouponID 优惠券ID。",
"type": "integer"
},
"coupon_title": {
"description": "CouponTitle 优惠券标题。",
"type": "string"
},
"created_at": {
"description": "CreatedAt 领取时间RFC3339。",
"type": "string"
},
"id": {
"description": "ID 用户券ID。",
"type": "integer"
},
"order_amount_paid": {
"description": "OrderAmountPaid 订单实付金额(分)。",
"type": "integer"
},
"order_id": {
"description": "OrderID 使用订单ID。",
"type": "integer"
},
"order_status": {
"description": "OrderStatus 订单状态。",
"allOf": [
{
"$ref": "#/definitions/consts.OrderStatus"
}
]
},
"order_status_description": {
"description": "OrderStatusDescription 订单状态描述(用于展示)。",
"type": "string"
},
"paid_at": {
"description": "PaidAt 订单支付时间RFC3339。",
"type": "string"
},
"risk_reason": {
"description": "RiskReason 异常说明。",
"type": "string"
},
"risk_type": {
"description": "RiskType 异常类型。",
"type": "string"
},
"status": {
"description": "Status 用户券状态。",
"allOf": [
{
"$ref": "#/definitions/consts.UserCouponStatus"
}
]
},
"status_description": {
"description": "StatusDescription 状态描述(用于展示)。",
"type": "string"
},
"tenant_code": {
"description": "TenantCode 租户编码。",
"type": "string"
},
"tenant_id": {
"description": "TenantID 租户ID。",
"type": "integer"
},
"tenant_name": {
"description": "TenantName 租户名称。",
"type": "string"
},
"used_at": {
"description": "UsedAt 使用时间RFC3339。",
"type": "string"
},
"user_id": {
"description": "UserID 用户ID。",
"type": "integer"
},
"username": {
"description": "Username 用户名。",
"type": "string"
}
}
},
"dto.SuperCouponStatusUpdateForm": {
"type": "object",
"required": [