From c4ab780caf48e3ea85a27b615493df25d7badb95 Mon Sep 17 00:00:00 2001 From: renzhiyuan <465386466@qq.com> Date: Fri, 24 Jul 2026 11:54:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=87=E4=BB=B6:=20xy=5Fsh?= =?UTF-8?q?/internal/entities/response.go?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xy_sh/internal/entities/response.go | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 xy_sh/internal/entities/response.go diff --git a/xy_sh/internal/entities/response.go b/xy_sh/internal/entities/response.go new file mode 100644 index 0000000..8e25ea7 --- /dev/null +++ b/xy_sh/internal/entities/response.go @@ -0,0 +1,33 @@ +package entities + +// ApiResponse 通用API响应 +type ApiResponse struct { + Code int `json:"code"` // 返回状态编码,0成功 -1失败 + Msg string `json:"msg"` // 返回错误信息 + Data interface{} `json:"data"` // JSON格式业务数据进行SM4加密后的字符串 +} + +// OrderResponse 下单接口响应业务参数 +type OrderResponse struct { + OrderNo string `json:"orderNo"` // 权益订单号 + CouponNo string `json:"couponNo,omitempty"` // 卡号 + CouponCode string `json:"couponCode,omitempty"` // 卡密 + Status int `json:"status"` // 状态 + ExpireTime string `json:"expireTime,omitempty"` // 有效期 +} + +// QueryResponse 查询接口响应业务参数 +type QueryResponse struct { + OrderNo string `json:"orderNo"` // 权益订单号 + Status int `json:"status"` // 订单状态 + Account string `json:"account,omitempty"` // 充值账号 + CardInfo *CardInfo `json:"cardInfo,omitempty"` // 卡券信息 + CouponId string `json:"couponId,omitempty"` // 优惠id +} + +// WechatRechargeResponse 微信立减金充值响应业务参数 +type WechatRechargeResponse struct { + OrderNo string `json:"orderNo"` // 权益订单号 + Status int `json:"status"` // 订单状态 + CouponId string `json:"couponId,omitempty"` // 微信优惠id +} \ No newline at end of file