GetOrderWaybillInfo可选参数:isGetPos支持获取运单骑手实时信息

This commit is contained in:
gazebo
2019-12-25 20:14:53 +08:00
parent 9e40e3942a
commit 6022d24634
10 changed files with 82 additions and 10 deletions

View File

@@ -5,6 +5,7 @@ import (
"time"
_ "git.rosy.net.cn/jx-callback/business/jxcallback/orderman"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/business/partner"
"git.rosy.net.cn/jx-callback/globals/testinit"
@@ -18,15 +19,14 @@ func TestCreateWaybill(t *testing.T) {
orderID := "817540316000041"
if order, err := partner.CurOrderManager.LoadOrder(orderID, model.VendorIDJD); err == nil {
// globals.SugarLogger.Debug(order)
c := new(DeliveryHandler)
_, err = c.CreateWaybill(order, nil)
_, err = CurDeliveryHandler.CreateWaybill(order, 0)
if err == nil {
time.Sleep(1 * time.Second)
bill := &model.Waybill{
VendorOrderID: orderID,
WaybillVendorID: model.VendorIDDada,
}
err = c.CancelWaybill(bill, partner.CancelWaybillReasonOther, "")
err = CurDeliveryHandler.CancelWaybill(bill, partner.CancelWaybillReasonOther, "")
if err != nil {
t.Fatal(err.Error())
}
@@ -37,3 +37,11 @@ func TestCreateWaybill(t *testing.T) {
t.Fatal(err.Error())
}
}
func TestGetRidderPosition(t *testing.T) {
lng, lat, err := CurDeliveryHandler.GetRidderPosition(jxcontext.AdminCtx, "", "80704840263399812", "", "")
if err != nil {
t.Fatal(err)
}
t.Logf("lng:%f, lat:%f", lng, lat)
}