This commit is contained in:
suyl
2021-06-21 18:58:57 +08:00
parent 8ce4c93c5f
commit fbb0e8a840
7 changed files with 54 additions and 42 deletions

View File

@@ -15,7 +15,7 @@ func TestQueryOassBussMoney(t *testing.T) {
}
func TestCheckAfsBill(t *testing.T) {
bussResult, bussErr := api.CheckAfsBill("2104611382000451")
bussResult, bussErr := api.CheckAfsBill("2114753262000162")
if bussErr != nil {
t.Error(bussErr.Error())
}

View File

@@ -318,7 +318,7 @@ type OrderInfo struct {
}
type OrderQueryParam struct {
PageNo int `json:"pageNo,omitempty"` // 当前页数,默认1
PageNo int `json:"pageNo,omitempty"` // 当前页数,默认1
PageSize int `json:"pageSize,omitempty"` // 每页条数,默认20最大值100
OrderID int64 `json:"orderId,omitempty"`
@@ -746,3 +746,19 @@ func (a *API) CheckSelfPickCode(selfPickCode, orderID, operPin string) (err erro
_, err = a.AccessAPINoPage("ocs/checkSelfPickCode", jdParams, nil, nil, nullResultParser)
return err
}
type RefDiffAdjustSkuList struct {
SkuId string `json:"skuId"`
SkuActualWeight int `json:"skuActualWeight"`
}
// 生成退差价逆向单接口
//http://opendj.jd.com/staticnew/widgets/resources.html?groupid=169&apiid=74ed627f2d2c45dbb804c900159e4c6a
func (a *API) GenerateReverseOrder(orderID string, skuList []*RefDiffAdjustSkuList) (err error) {
jdParams := map[string]interface{}{
"orderId": orderID,
"refDiffAdjustSkuList": skuList,
}
_, err = a.AccessAPINoPage("reverse/generateReverseOrder", jdParams, nil, nil, nullResultParser)
return err
}

View File

@@ -87,7 +87,7 @@ func TestDeliveryEndOrder(t *testing.T) {
}
func TestGetAfsService(t *testing.T) {
result, err := api.GetAfsService("33927317")
result, err := api.GetAfsService("34081924")
if err != nil {
t.Fatal(err.Error())
}
@@ -103,7 +103,7 @@ func TestGetAfsService2(t *testing.T) {
}
func TestOrderShoudSettlementService2(t *testing.T) {
result, err := api.OrderShoudSettlementService2("2114317310000151")
result, err := api.OrderShoudSettlementService2("2114464478000161")
if err != nil {
t.Fatal(err.Error())
}
@@ -185,3 +185,15 @@ func TestCancelAndRefund(t *testing.T) {
t.Fatal(err.Error())
}
}
func TestGenerateReverseOrder(t *testing.T) {
err := api.GenerateReverseOrder("2114820876000231", []*RefDiffAdjustSkuList{
&RefDiffAdjustSkuList{
SkuId: "2036475569",
SkuActualWeight: 230,
},
})
if err != nil {
t.Fatal(err.Error())
}
}