refactor(model):优化分账相关模型结构体字段类型

- 将 ApplyBindReqData 中 Attachments 字段类型改为 []*ApplyBindAttachment- 新增 ApplyBindAttachment 结构体统一附件信息定义
- 将 ApplyLedgerMerReqData 中 Attachments 字段类型改为 []*ApplyBindAttachment- 将 ApplyLedgerReceiver 中 AttachList 字段类型改为 []*ApplyBindAttachment- 将 PreorderResponse 中 ReqData 字段指针化避免拷贝
- 将 ReqData 中 AccRespFields 字段指针化提升性能
- 将 QueryLedgerMerResponse 中 BindRelations 字段类型改为 []*BindRelation
- 调整字段注释格式增强可读性- 统一结构体字段命名风格提高一致性
menu v1.0.3
maguodong 2025-10-09 17:56:31 +08:00
parent 1e5214abfb
commit 0aa9bc80ec
5 changed files with 47 additions and 57 deletions

View File

@ -24,11 +24,13 @@ type ApplyBindReqData struct {
EntrustFileName string `json:"entrustFileName"` // 合作协议附件名称必传长度32
EntrustFilePath string `json:"entrustFilePath"` // 合作协议附件路径必传长度32通过调用附件上传接口获取
RetUrl string `json:"retUrl"` // 回调通知地址必传长度128审核通过后通知地址
Attachments []struct {
Attachments []*ApplyBindAttachment `json:"attachments,omitempty"` // 附加资料,可选,集合类型,其他附加资料文件信息
}
type ApplyBindAttachment struct {
AttachType string `json:"attachType"` // 附件类型编码必传长度32
AttachName string `json:"attachName"` // 附件名称必传长度32
AttachStorePath string `json:"attachStorePath"` // 附件路径必传长度128通过调用附件上传接口获取
} `json:"attachments,omitempty"` // 附加资料,可选,集合类型,其他附加资料文件信息
}
// ApplyBindResponse 分账关系绑定响应结构体

View File

@ -26,11 +26,7 @@ type ApplyLedgerMerReqData struct {
SettleType string `json:"settleType"` // 结算类型非必传长度32取值说明01-主扫现结02-复扫现结03-交易自动结算
SplitRuleSource string `json:"splitRuleSource"` // 分账规则来源条件必传长度32取值说明MER-商户自定规则PLATFORM-平台分润规则(分润规则必传)
RetUrl string `json:"retUrl"` // 回调通知地址必传长度128分账申请结果以异步消息或同步返回的方式通知如需无线路由处理也可以通过第三方商户信息查询接口确定结算结果
Attachments []struct {
AttachType string `json:"attachType"` // 附件类型编码必传长度32
AttachName string `json:"attachName"` // 附件名称必传长度32
AttachStorePath string `json:"attachStorePath"` // 附件路径必传长度128调用附件上传接口获取
} `json:"attachments,omitempty"` // 附加资料,可选,集合,其他需附加的文件信息
Attachments []*ApplyBindAttachment `json:"attachments,omitempty"` // 附加资料,可选,集合,其他需附加的文件信息
}
// ApplyLedgerMerResponse 商户分账业务开通申请响应结构体

View File

@ -55,14 +55,7 @@ type ApplyLedgerReceiverReqData struct {
// 收款账户清算行行号必传长度32取值说明参照FBI.N信息查询仅支持对私结算账户
AcctClearBankCode string `json:"acctClearBankCode"`
// 接收方附件资料,可选,集合
AttachList []struct {
// 附件名称可选长度32
AttachName string `json:"attachName"`
// 附件路径可选长度32取值说明调用进件附件上传接口获取到附件路径
AttachStorePath string `json:"attachStorePath"`
// 附件类型编码可选长度32
AttachType string `json:"attachType"`
} `json:"attachList"`
AttachList []*ApplyBindAttachment `json:"attachList"`
// 提款类型可选长度32取值说明01主动提款03交易自动结算不填默认01
SettleType string `json:"settleType"`
}

View File

@ -37,7 +37,7 @@ func NewPreorder(param *PreorderReqData) *Preorder {
type PreorderResponse struct {
Code string `json:"code"` // 响应码BBS00000表示成功
Msg string `json:"msg"` // 响应信息,对响应码的文字描述
ReqData ReqData `json:"resp_data"` // 响应业务数据
ReqData *ReqData `json:"resp_data"` // 响应业务数据
RespTime string `json:"resp_time"` // 响应时间
}
@ -49,8 +49,7 @@ type ReqData struct {
LogNo string `json:"log_no"` // 拉卡拉对账单流水号
SettleMerchantNo string `json:"settle_merchant_no"` // 结算商户号
SettleTermNo string `json:"settle_term_no"` // 结算终端号
AccRespFields WxPreorderResponse `json:"acc_resp_fields"` // 支付通道返回的具体信息
AccRespFields *WxPreorderResponse `json:"acc_resp_fields"` // 支付通道返回的具体信息
}
// WxPreorderResponse 支付通道返回的具体信息

View File

@ -66,7 +66,7 @@ type QueryLedgerMerRespData struct {
// 分账规则来源取值说明MER商户分账规则PLATFORM平台分账规则
SplitRuleSource string `json:"split_rule_source"`
// 已绑定接收方列表
BindRelations []BindRelation `json:"bind_relations"`
BindRelations []*BindRelation `json:"bind_relations"`
}
// BindRelation 已绑定接收方信息结构体