添加骑手位置推送
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/delivery"
|
||||
@@ -216,6 +217,9 @@ func OnWaybillMsg(msg *fnpsapi.OrderStatusNottify) (resp *fnpsapi.CallbackRespon
|
||||
StatusTime: utils.Timestamp2Time(cc.PushTime),
|
||||
Remark: cc.Description,
|
||||
}
|
||||
if cc.PushTime == 0 {
|
||||
order.StatusTime = time.Now()
|
||||
}
|
||||
order.VendorOrderID, order.OrderVendorID = jxutils.SplitUniversalOrderID(cc.PartnerOrderCode)
|
||||
orderStatus, err := strconv.Atoi(order.VendorStatus)
|
||||
if err != nil {
|
||||
|
||||
@@ -52,7 +52,7 @@ func GetOrderRiderInfoToPlatform(orderId string) {
|
||||
//4.如订单已完成、已取消等状态发货将失败。
|
||||
for _, v := range orders {
|
||||
globals.SugarLogger.Debug("==========orderId,vendorId,waybillId:", v.VendorOrderID, v.VendorID, v.WaybillVendorID)
|
||||
var riderInfo *mtpsapi.RiderInfo
|
||||
riderInfo:= &mtpsapi.RiderInfo{}
|
||||
if handlerInfo := partner.GetDeliveryPlatformFromVendorID(v.WaybillVendorID); handlerInfo != nil {
|
||||
if v.WaybillVendorID == model.VendorIDDada || v.WaybillVendorID == model.VendorIDFengNiao {
|
||||
riderInfo, err = handlerInfo.Handler.GetRiderInfo(v.VendorOrderID, 0, "")
|
||||
@@ -72,6 +72,10 @@ func GetOrderRiderInfoToPlatform(orderId string) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
if riderInfo.CourierName == "" {
|
||||
globals.SugarLogger.Debug("同步外卖骑手位置信息到美团失败,为获取到订单的骑手信息:", "----")
|
||||
continue
|
||||
}
|
||||
|
||||
// 目前只推送美团骑手信息
|
||||
switch v.VendorID {
|
||||
|
||||
Reference in New Issue
Block a user