调整京西商城支付

This commit is contained in:
gazebo
2019-12-19 16:20:10 +08:00
parent 415cc834fc
commit 850c35c9d9
4 changed files with 36 additions and 22 deletions

View File

@@ -296,25 +296,26 @@ type OrderComment struct {
type OrderPay struct {
ModelIDCULD
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
PayType int `json:"payType"`
PayOrderID string `orm:"column(pay_order_id);size(48)" json:"payOrderID"` // 京西支付定单号
PayType int `json:"payType"`
VendorPayType string `orm:"size(48)" json:"vendorPayType"`
VendorOrderID string `orm:"column(vendor_order_id);size(48);index" json:"vendorOrderID"` // 支付对应的购物订单号
VendorID int `orm:"column(vendor_id)" json:"vendorID"` // 购物订单所属厂商代码(当前只有京西)
Status int `json:"status"`
PayCreatedAt time.Time `orm:"type(datetime);index" json:"payCreatedAt"`
PayFinishedAt *time.Time `orm:"type(datetime);null" json:"payFinishedAt"`
TotalFee int `json:"totalFee"`
TransactionID string `orm:"column(transaction_id);index;size(48)" json:"transactionID"`
PrepayID string `orm:"column(prepay_id);unique;size(48)" json:"prepayID"`
PrepayID string `orm:"column(prepay_id);index;size(48)" json:"prepayID"` // 下单后支付前支付方生成的事务ID
TransactionID string `orm:"column(transaction_id);index;size(48)" json:"transactionID"` // 支付成功后支付方生成的事务ID
CodeURL string `orm:"column(code_url);size(256)" json:"codeURL"`
PayOrderID string `orm:"column(pay_order_id);size(48)" json:"payOrderID"`
OriginalData string `orm:"type(text)" json:"-"`
}
func (v *OrderPay) TableIndex() [][]string {
return [][]string{
[]string{"VendorOrderID", "VendorID", "PayType", "DeletedAt"},
[]string{"PayOrderID", "PayType", "DeletedAt"},
}
}
@@ -322,12 +323,11 @@ type OrderPayRefund struct {
ModelIDCULD
RefundID string `orm:"column(refund_id);unique;size(48)" json:"refundID"`
VendorRefundID string `orm:"column(vendor_refund_id);unique;size(48)" json:"vendorRefundID"`
VendorRefundID string `orm:"column(vendor_refund_id);unique;size(48)" json:"vendorRefundID"` // 支付方退款成功后生成的退款单号
AfsOrderID string `orm:"column(afs_order_id);index;size(48)" json:"afsOrderID"` // AfsOrderID与RefundID的区别
VendorOrderID string `orm:"column(vendor_order_id);index;size(48)" json:"vendorOrderID"`
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
TransactionID string `orm:"column(transaction_id);index;size(48)" json:"transactionID"`
TransactionID string `orm:"column(transaction_id);index;size(48)" json:"transactionID"` // 支付成功后支付方生成的事务ID
Status int `json:"status"`
RefundCreatedAt time.Time `orm:"type(datetime);index" json:"payCreatedAt"`
RefundFinishedAt *time.Time `orm:"type(datetime);null" json:"payFinishedAt"`