提交 a81a5922 authored 作者: 屈传平's avatar 屈传平

wangdian

上级 bb756f28
...@@ -3,6 +3,7 @@ package wangdian ...@@ -3,6 +3,7 @@ package wangdian
import ( import (
"context" "context"
"github.com/gogf/gf/encoding/gjson" "github.com/gogf/gf/encoding/gjson"
jsoniter "github.com/json-iterator/go"
) )
var OrderRefund = new(orderRefund) var OrderRefund = new(orderRefund)
...@@ -11,22 +12,24 @@ type orderRefund struct { ...@@ -11,22 +12,24 @@ type orderRefund struct {
} }
type SalesRefundPushReq struct { type SalesRefundPushReq struct {
Tid string `json:"tid"` Tid string `json:"tid"`
ShopNo string `json:"shop_no"` ShopNo string `json:"shop_no"`
PlatformId int `json:"platform_id"` PlatformId int `json:"platform_id"`
RefundNo int `json:"refund_no"` RefundNo int `json:"refund_no"`
Type int `json:"type"` Type int `json:"type"`
Status string `json:"status"` Status string `json:"status"`
RefundFee float64 `json:"refund_fee"` RefundFee float64 `json:"refund_fee"`
BuyerNick string `json:"buyer_nick"` BuyerNick string `json:"buyer_nick"`
RefundTime string `json:"refund_time"` RefundTime string `json:"refund_time"`
Reason string `json:"reason"` Reason string `json:"reason"`
Desc string `json:"desc"` Desc string `json:"desc"`
RefundVersion string `json:"refund_version"` RefundVersion string `json:"refund_version"`
OrderList []struct { OrderList []*RefundOrderList `json:"order_list"`
Oid string `json:"oid"` }
Num int `json:"num"`
} `json:"order_list"` type RefundOrderList struct {
Oid string `json:"oid"`
Num int `json:"num"`
} }
type SalesRefundPushRes struct { type SalesRefundPushRes struct {
...@@ -38,8 +41,10 @@ type SalesRefundPushRes struct { ...@@ -38,8 +41,10 @@ type SalesRefundPushRes struct {
创建原始退款单 创建原始退款单
*/ */
func (s *orderRefund) SalesRefundPush(ctx context.Context, req *SalesRefundPushReq) (res *SalesRefundPushRes, err error) { func (s *orderRefund) SalesRefundPush(ctx context.Context, req *SalesRefundPushReq) (res *SalesRefundPushRes, err error) {
params := make(map[string]interface{})
result, err := post(ctx, "/openapi2/sales_refund_push.php", req) json, _ := jsoniter.MarshalToString(req)
params["api_refund_list"] = json
result, err := post(ctx, "/openapi2/sales_refund_push.php", params)
if nil != err { if nil != err {
return return
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论