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

wangdian

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