Files
zhengchiliu 0863234bc5 feat(backend): 对齐业务服务额度与内容治理口径
仪表盘待办与穿搭概况改为公开/私密/已封禁口径,移除恒为零的待审核统计;补齐额度凭证来源 source=4 与流水 change_type=7 枚举及订单商品类型、额度有效期快照字段;管理员发放与回收额度凭证在同一事务内写入人工调整流水,回收流水使用独立 order_no 避免撞唯一索引,并增加凭证归属校验;对齐 Quota 配置免费额度值,同步更新 README 与配置说明。
2026-09-16 02:58:56 +08:00

80 lines
3.3 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package dto
// OrderListRequest 订单列表请求。
type OrderListRequest struct {
PageRequest
OrderNo string `form:"order_no"` // 订单号(精确)
TransactionID string `form:"transaction_id"` // 微信交易号(精确)
UserID int64 `form:"user_id"` // 用户 ID
Status int8 `form:"status" binding:"omitempty,oneof=1 2 3 4 5"`
}
// OrderItem 订单信息(金额单位:分)。
type OrderItem struct {
OrderNo string `json:"order_no"`
UserID int64 `json:"user_id"`
GoodsID int64 `json:"goods_id"`
GoodsName string `json:"goods_name"`
UnitPrice int64 `json:"unit_price"`
TotalAmount int64 `json:"total_amount"`
PayAmount int64 `json:"pay_amount"`
PayChannel int8 `json:"pay_channel"` // 1=微信支付 2=微信虚拟支付
OrderStatus int8 `json:"order_status"`
TransactionID string `json:"transaction_id"`
MemberDays int64 `json:"member_days"`
GoodsType int8 `json:"goods_type"` // 商品类型快照 1=会员包 2=上传包 3=AI推荐包 4=衣柜分享包 5=搭配分享包
QuotaValidDays int64 `json:"quota_valid_days"` // 额度有效期天数快照(加量包按此计算赠送有效期;会员包为 0 表示跟随 VIP)
UploadQuota int64 `json:"upload_quota"`
AIRecommendQuota int64 `json:"ai_recommend_quota"`
ClosetShareQuota int64 `json:"closet_share_quota"`
OutfitShareQuota int64 `json:"outfit_share_quota"`
ExpireTime int64 `json:"expire_time"`
PayTime int64 `json:"pay_time"`
RefundTime int64 `json:"refund_time"`
RefundAmount int64 `json:"refund_amount"`
Remark string `json:"remark"`
XPayProductID string `json:"xpay_product_id"` // 虚拟支付道具ID(pay_channel=2 时使用)
XPayPlatform string `json:"xpay_platform"` // 虚拟支付平台 android/ios/harmony/windows
XPayEnv int8 `json:"xpay_env"` // 虚拟支付环境 0=现网 1=沙箱
CreatedAt int64 `json:"created_at"`
}
// OrderListResponse 订单列表响应。
type OrderListResponse struct {
PageResponse
List []OrderItem `json:"list"`
}
// RefundListRequest 退款单列表请求。
// Status 用指针区分「未传(nil,不过滤)」与「显式传 0(筛选待处理)」。
type RefundListRequest struct {
PageRequest
Status *int8 `form:"status" binding:"omitempty,oneof=0 1 2 3"` // 0=待处理 1=退款中 2=成功 3=失败;不传=全部
OrderNo string `form:"order_no"`
}
// RefundItem 退款单信息。
type RefundItem struct {
RefundNo string `json:"refund_no"`
OrderNo string `json:"order_no"`
UserID int64 `json:"user_id"`
RefundAmount int64 `json:"refund_amount"`
RefundReason string `json:"refund_reason"`
Status int8 `json:"status"` // 0=待处理 1=退款中 2=退款成功 3=退款失败
ApplyTime int64 `json:"apply_time"`
SuccessTime int64 `json:"success_time"`
FailReason string `json:"fail_reason"`
CreatedAt int64 `json:"created_at"`
}
// RefundListResponse 退款单列表响应。
type RefundListResponse struct {
PageResponse
List []RefundItem `json:"list"`
}
// RefundAuditRequest 退款审核请求。
type RefundAuditRequest struct {
Reason string `json:"reason" binding:"required,max=200"` // 通过=审核备注;驳回=驳回原因
}