This commit is contained in:
邹宗楠
2023-12-01 17:21:41 +08:00
parent aa14619c36
commit 472dc08685
8 changed files with 37 additions and 40 deletions

View File

@@ -142,7 +142,7 @@ func (c *DeliveryHandler) onWaybillMsg(msg *mtpsapi.CallbackOrderMsg) (retVal *m
switch order.OrderVendorID {
case model.VendorIDDD:
Lng, Lat, _ := partner.GetRidderPositionGetter(order.WaybillVendorID).GetRidderPosition(nil, order.VendorOrderID, order.VendorOrderID, order.VendorWaybillID, order.VendorWaybillID2)
pushMTPSToTiktok(msg.Status, order, utils.Float64ToStr(Lng), utils.Float64ToStr(Lat))
pushMTPSToTiktok(msg.Status, order, utils.Float64ToStr(Lng), utils.Float64ToStr(Lat), goodsOrder.VendorOrgCode)
case model.VendorIDMTWM, model.VendorIDTaoVegetable:
delivery.GetOrderRiderInfoToPlatform(order.VendorOrderID, order.Status) // 骑手位置更新
if goodsOrder.VendorID == model.VendorIDTaoVegetable && msg.Status == mtpsapi.OrderStatusAccepted {
@@ -153,7 +153,7 @@ func (c *DeliveryHandler) onWaybillMsg(msg *mtpsapi.CallbackOrderMsg) (retVal *m
return err
}
func pushMTPSToTiktok(msgStatus int, order *model.Waybill, lng, lat string) {
func pushMTPSToTiktok(msgStatus int, order *model.Waybill, lng, lat, vendorOrgCode string) {
result := &utils.RiderInfo{
OrderId: order.VendorOrderID,
ThirdCarrierOrderId: order.VendorOrderID,
@@ -186,11 +186,12 @@ func pushMTPSToTiktok(msgStatus int, order *model.Waybill, lng, lat string) {
result.LogisticsStatus = 0
result.LogisticsContext = model.RiderGetOrderDeliverOther
}
delivery.PullTiktokRiderInfo(result)
if result.LogisticsStatus == model.WaybillStatusCourierArrived {
result.LogisticsStatus = model.WaybillStatusDelivering
result.LogisticsContext = model.RiderGetOrderDelivering
delivery.PullTiktokRiderInfo(result)
delivery.PullTiktokRiderInfo(result, vendorOrgCode)
} else {
delivery.PullTiktokRiderInfo(result, vendorOrgCode)
}
}