aa
This commit is contained in:
@@ -14,3 +14,37 @@ func (a *API) QueryOassBussMoney(orderId string) ([]map[string]interface{}, erro
|
||||
}
|
||||
return utils.Slice2MapSlice(result.([]interface{})), nil
|
||||
}
|
||||
|
||||
type CheckAfsBillResult struct {
|
||||
AfsID int `json:"afsId"`
|
||||
AfsSource int `json:"afsSource"`
|
||||
AfsType int `json:"afsType"`
|
||||
BillOrderType int `json:"billOrderType"`
|
||||
DiffLessCommision float64 `json:"diffLessCommision"`
|
||||
FreightBill int `json:"freightBill"`
|
||||
FreightCommissionBill int `json:"freightCommissionBill"`
|
||||
GiftcardBill int `json:"giftcardBill"`
|
||||
GiftcardBillStatus int `json:"giftcardBillStatus"`
|
||||
GoodsBill int `json:"goodsBill"`
|
||||
GoodsCommissionBill int `json:"goodsCommissionBill"`
|
||||
GoogsSettlementStatus int `json:"googsSettlementStatus"`
|
||||
MarketBill int `json:"marketBill"`
|
||||
MarketSettlementStatus int `json:"marketSettlementStatus"`
|
||||
MarketingServiceFee int `json:"marketingServiceFee"`
|
||||
MarketingServiceFeeStatus int `json:"marketingServiceFeeStatus"`
|
||||
OrderID int64 `json:"orderId"`
|
||||
PackageBill int `json:"packageBill"`
|
||||
}
|
||||
|
||||
// 查询订单售后计费明细接口
|
||||
// https://openo2o.jddj.com/staticnew/widgets/resources.html?groupid=182&apiid=4a0b2f16ae884695876aab70e79783ee
|
||||
func (a *API) CheckAfsBill(orderId string) (checkAfsBillResult []*CheckAfsBillResult, err error) {
|
||||
jdParams := map[string]interface{}{
|
||||
"orderId": orderId,
|
||||
}
|
||||
result, err := a.AccessAPINoPage("bill/checkAfsBill", jdParams, nil, nil, genNoPageResultParser("code", "msg", "result", "200"))
|
||||
if err == nil {
|
||||
utils.Map2StructByJson(result, &checkAfsBillResult, false)
|
||||
}
|
||||
return checkAfsBillResult, nil
|
||||
}
|
||||
|
||||
@@ -2,14 +2,22 @@ package jdapi
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
)
|
||||
|
||||
func TestQueryOassBussMoney(t *testing.T) {
|
||||
bussResult, bussErr := api.QueryOassBussMoney("815536199000222")
|
||||
bussResult, bussErr := api.QueryOassBussMoney("2104611382000451")
|
||||
if bussErr != nil {
|
||||
t.Error(bussErr.Error())
|
||||
}
|
||||
if len(bussResult) <= 0 {
|
||||
t.Error("错误:返回数据长度不该为0")
|
||||
}
|
||||
t.Log(utils.Format4Output(bussResult, false))
|
||||
}
|
||||
|
||||
func TestCheckAfsBill(t *testing.T) {
|
||||
bussResult, bussErr := api.CheckAfsBill("2104611382000451")
|
||||
if bussErr != nil {
|
||||
t.Error(bussErr.Error())
|
||||
}
|
||||
t.Log(utils.Format4Output(bussResult, false))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user