Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
F-1: 佣金链断裂时创建 status=99 零额待审记录,新增修正接口 POST /commission-records/:id/resolve F-4: C端订单查询从 Handler 迁移至 Service 层,移除 SkipPermissionCtx J-1: 富友支付 JSAPI/MiniApp 预下单实现,回调补全签名验证 J-2: 平台钱包代购支持(buyerType 为空时使用资产所属代理钱包) J-3: 套餐激活后自动更新卡/设备 status=3,最后套餐过期后更新 status=4 支付抽象: 引入 PaymentProvider 接口 + 微信/富友适配器,CreateOrder 支持多支付渠道 修复: 设备/IoT卡响应 DTO 移除 omitempty,空值字段返回 null 而非省略
57 lines
2.1 KiB
Go
57 lines
2.1 KiB
Go
package dto
|
|
|
|
type WechatOAuthRequest struct {
|
|
Code string `json:"code" validate:"required" required:"true" description:"微信授权码"`
|
|
}
|
|
|
|
type WechatOAuthResponse struct {
|
|
AccessToken string `json:"access_token" description:"访问令牌"`
|
|
ExpiresIn int64 `json:"expires_in" description:"令牌有效期(秒)"`
|
|
Customer *PersonalCustomerResponse `json:"customer" description:"客户信息"`
|
|
}
|
|
|
|
type WechatPayJSAPIRequest struct {
|
|
OpenID string `json:"openid" validate:"required" required:"true" description:"用户OpenID"`
|
|
}
|
|
|
|
type WechatPayJSAPIResponse struct {
|
|
PrepayID string `json:"prepay_id" description:"预支付交易会话标识"`
|
|
PayConfig map[string]interface{} `json:"pay_config" description:"JSSDK支付配置"`
|
|
}
|
|
|
|
type FuiouPayJSAPIResponse struct {
|
|
AppID string `json:"app_id" description:"应用ID"`
|
|
TimeStamp string `json:"time_stamp" description:"时间戳"`
|
|
NonceStr string `json:"nonce_str" description:"随机字符串"`
|
|
Package string `json:"package" description:"预支付参数包"`
|
|
SignType string `json:"sign_type" description:"签名类型"`
|
|
PaySign string `json:"pay_sign" description:"支付签名"`
|
|
}
|
|
|
|
type WechatPayH5Request struct {
|
|
SceneInfo WechatH5SceneInfo `json:"scene_info" validate:"required" required:"true" description:"场景信息"`
|
|
}
|
|
|
|
type WechatH5SceneInfo struct {
|
|
PayerClientIP string `json:"payer_client_ip" validate:"required,ip" required:"true" description:"用户终端IP"`
|
|
H5Info WechatH5Detail `json:"h5_info" description:"H5场景信息"`
|
|
}
|
|
|
|
type WechatH5Detail struct {
|
|
Type string `json:"type" validate:"omitempty,oneof=iOS Android Wap" description:"场景类型 (iOS:苹果, Android:安卓, Wap:浏览器)"`
|
|
}
|
|
|
|
type WechatPayH5Response struct {
|
|
H5URL string `json:"h5_url" description:"微信支付跳转URL"`
|
|
}
|
|
|
|
type WechatPayJSAPIParams struct {
|
|
ID uint `path:"id" description:"订单ID" required:"true"`
|
|
WechatPayJSAPIRequest
|
|
}
|
|
|
|
type WechatPayH5Params struct {
|
|
ID uint `path:"id" description:"订单ID" required:"true"`
|
|
WechatPayH5Request
|
|
}
|