aa
This commit is contained in:
@@ -12,6 +12,10 @@ const (
|
||||
MtUnionOrderTypeHF = 5 //话费订单
|
||||
MtUnionOrderTypeSG = 6 //闪购订单
|
||||
|
||||
MtUnionOrderStatusPay = "1" //已付款
|
||||
MtUnionOrderStatusFinished = "8" //已完成
|
||||
MtUnionOrderStatusCanceled = "9" //已退款或风控
|
||||
|
||||
defaultPageSize = 50
|
||||
)
|
||||
|
||||
@@ -78,3 +82,45 @@ func (a *API) CouponList(orderType int, startTime, endTime int64, page int, sid
|
||||
}
|
||||
return couponListResult, err
|
||||
}
|
||||
|
||||
type RtnotifyResult struct {
|
||||
Coupon []struct {
|
||||
Sequence string `json:"sequence"`
|
||||
Orderid string `json:"orderid"`
|
||||
Price string `json:"price"`
|
||||
Profit string `json:"profit"`
|
||||
Usetime string `json:"usetime"`
|
||||
} `json:"coupon"`
|
||||
Order struct {
|
||||
Smstitle string `json:"smstitle"`
|
||||
UID string `json:"uid"`
|
||||
Total string `json:"total"`
|
||||
Quantity string `json:"quantity"`
|
||||
Orderid string `json:"orderid"`
|
||||
Dealid string `json:"dealid"`
|
||||
Modtime string `json:"modtime"`
|
||||
Direct string `json:"direct"`
|
||||
Paytime string `json:"paytime"`
|
||||
Sid string `json:"sid"`
|
||||
Status int `json:"status"`
|
||||
} `json:"order"`
|
||||
Refund []struct {
|
||||
Quantity string `json:"quantity"`
|
||||
Refundtime string `json:"refundtime"`
|
||||
Money string `json:"money"`
|
||||
Orderid string `json:"orderid"`
|
||||
Profit string `json:"profit"`
|
||||
} `json:"refund"`
|
||||
}
|
||||
|
||||
func (a *API) Rtnotify(oid, orderType string) (rtnotifyResult *RtnotifyResult, err error) {
|
||||
result, err := a.AccessAPI2("api/rtnotify", false, map[string]interface{}{
|
||||
"oid": oid,
|
||||
"type": orderType,
|
||||
"full": 1,
|
||||
})
|
||||
if err == nil {
|
||||
utils.Map2StructByJson(result, &rtnotifyResult, false)
|
||||
}
|
||||
return rtnotifyResult, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user