1
This commit is contained in:
@@ -19,6 +19,7 @@ import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/ebai"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/mtwm"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api"
|
||||
@@ -97,12 +98,6 @@ func GetOrderRiderInfoToPlatform(orderId string, wayBillStatus int) {
|
||||
//3.当同一个订单已经上传了一次配送信息,如再次同步会更新配送信息,以最新的一次为准。
|
||||
//4.如订单已完成、已取消等状态发货将失败。
|
||||
for _, v := range orders {
|
||||
//if orderId == "" { // 订单id为空是,是定时轮询操作,不做此状态
|
||||
// waybillList, _ := dao.GetWaybills(db, v.VendorOrderID, nil)
|
||||
// if len(waybillList) > 0 && waybillList[0].Status > model.WaybillStatusEndBegin {
|
||||
// continue
|
||||
// }
|
||||
//}
|
||||
if v.Status >= model.OrderStatusEndBegin {
|
||||
continue
|
||||
}
|
||||
@@ -176,7 +171,7 @@ func GetOrderRiderInfoToPlatform(orderId string, wayBillStatus int) {
|
||||
default:
|
||||
continue
|
||||
}
|
||||
// 有时候运单状态改变之后但是上面的订单状态还没来得及改变,这里覆盖一下
|
||||
// 有时候运单状态改变之后但是上面的订单状态还没来得及改变,这里覆盖一下(riderInfo.LogisticsStatus 美团状态为准)
|
||||
if wayBillStatus != model.NO {
|
||||
switch wayBillStatus {
|
||||
case 5: // 呼叫骑手
|
||||
@@ -238,7 +233,17 @@ func GetOrderRiderInfoToPlatform(orderId string, wayBillStatus int) {
|
||||
case model.VendorIDELM: // 饿了么
|
||||
continue
|
||||
case model.VendorIDEBAI: // 饿百发单
|
||||
continue
|
||||
if orderId == "" {
|
||||
if handler := partner.GetPurchaseOrderHandlerFromVendorID(v.VendorID); handler != nil {
|
||||
if err := handler.GetOrderRider(v.VendorOrgCode, v.VendorStoreID, utils.Struct2Map(riderInfo, "", true)); err != nil {
|
||||
globals.SugarLogger.Debugf("Error pushing ebai rider information :%s--%s--%v", v.VendorOrderID, utils.Format4Output(riderInfo, false), err)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if err := ebai.OrderStatussync(utils.Struct2Map(riderInfo, "", true)); err != nil {
|
||||
globals.SugarLogger.Debugf("Error pushing ebai OrderStatussync information :%s--%s--%v", v.VendorOrderID, utils.Format4Output(riderInfo, false), err)
|
||||
}
|
||||
}
|
||||
case model.VendorIDJD: // 京东发单
|
||||
continue
|
||||
case model.VendorIDGD: // 美团发单
|
||||
|
||||
Reference in New Issue
Block a user