测试鼎
This commit is contained in:
@@ -40,7 +40,7 @@ func TestAddOrderAfterQuery(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestCancel(t *testing.T) {
|
func TestCancel(t *testing.T) {
|
||||||
cancelResponse, err := dadaapi.CancelOrder("88330338129212", ReasonIDOther, "接单时间过长")
|
cancelResponse, err := dadaapi.CancelOrder("129178201000000002", ReasonIDOther, "协商一致")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package jdshopapi
|
package jdshopapi
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
@@ -21,6 +22,8 @@ func (a *API) GetCallbackMsg(request *http.Request) (call *GetOrderResult, err e
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
mapData := utils.URLValues2Map(values)
|
mapData := utils.URLValues2Map(values)
|
||||||
|
fmt.Println("test1", utils.Format4Output(mapData, false))
|
||||||
utils.Map2StructByJson(mapData, &call, false)
|
utils.Map2StructByJson(mapData, &call, false)
|
||||||
|
fmt.Println("test2", utils.Format4Output(call, false))
|
||||||
return call, err
|
return call, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ func (a *API) GetOrder(orderID int64) (getOrderResult *GetOrderResult, err error
|
|||||||
orderPayment,freightPrice,orderState,orderStateRemark,
|
orderPayment,freightPrice,orderState,orderStateRemark,
|
||||||
orderStartTime,orderEndTime,orderRemark,consigneeInfo,
|
orderStartTime,orderEndTime,orderRemark,consigneeInfo,
|
||||||
itemInfoList,pauseBizInfo`,
|
itemInfoList,pauseBizInfo`,
|
||||||
"order_state": "WAIT_SELLER_STOCK_OUT,PAUSE",
|
// "order_state": "WAIT_SELLER_STOCK_OUT,PAUSE",
|
||||||
})
|
})
|
||||||
if err == nil {
|
if err == nil {
|
||||||
utils.Map2StructByJson(result["jingdong_pop_order_get_responce"].(map[string]interface{})["orderDetailInfo"].(map[string]interface{})["orderInfo"], &getOrderResult, false)
|
utils.Map2StructByJson(result["jingdong_pop_order_get_responce"].(map[string]interface{})["orderDetailInfo"].(map[string]interface{})["orderInfo"], &getOrderResult, false)
|
||||||
|
|||||||
Reference in New Issue
Block a user