+ GetByOrderNoForOaosNew

This commit is contained in:
gazebo
2019-09-05 18:22:28 +08:00
parent cd08000879
commit a464da4476
2 changed files with 23 additions and 2 deletions

View File

@@ -707,6 +707,19 @@ func (a *API) GetByOrderNoForOaos(orderNo string) (orderTrackList []*OrderTrack,
return orderTrackList, err
}
// 新版根据订单号查询订单跟踪接口
// https://openo2o.jddj.com/staticnew/widgets/resources.html?groupid=169&apiid=6450cd91dd5b4dc0bb6a6cd17af6d0a4
func (a *API) GetByOrderNoForOaosNew(orderID string) (orderTrackList []*OrderTrack, err error) {
jdParams := map[string]interface{}{
"orderId": orderID,
}
result, err := a.AccessAPINoPage("orderTrace/getByOrderNoForOaosNew", jdParams, nil, nil, genNoPageResultParser("code", "detail", "result", "0"))
if err == nil {
err = utils.Map2StructByJson(result.(map[string]interface{})["orderTrackList"], &orderTrackList, false)
}
return orderTrackList, err
}
// 订单自提码核验接口
// https://openo2o.jddj.com/staticnew/widgets/resources.html?groupid=169&apiid=428fa2cb66784b64a85db36ec2972ff9
func (a *API) CheckSelfPickCode(selfPickCode, orderID, operPin string) (err error) {

View File

@@ -238,7 +238,15 @@ func TestOrderQuery2(t *testing.T) {
}
func TestGetByOrderNoForOaos(t *testing.T) {
orderList, err := api.GetByOrderNoForOaos("921160248000222")
orderList, err := api.GetByOrderNoForOaos("921235438000341")
t.Log(utils.Format4Output(orderList, false))
if err != nil {
t.Fatal(err.Error())
}
}
func TestGetByOrderNoForOaosNew(t *testing.T) {
orderList, err := api.GetByOrderNoForOaosNew("921235438000341")
t.Log(utils.Format4Output(orderList, false))
if err != nil {
t.Fatal(err.Error())
@@ -246,7 +254,7 @@ func TestGetByOrderNoForOaos(t *testing.T) {
}
func TestCheckSelfPickCode(t *testing.T) {
err := api.CheckSelfPickCode("", "921241806000842", "test")
err := api.CheckSelfPickCode("020606", "921235438000341", "test")
if err != nil {
t.Fatal(err.Error())
}