打桩,测试美团配送

This commit is contained in:
邹宗楠
2022-11-30 10:26:58 +08:00
parent 874d2ffc76
commit f780a123e4
5 changed files with 15 additions and 67 deletions

View File

@@ -156,6 +156,7 @@ func (c *DeliveryHandler) onWaybillMsg(msg *mtpsapi.CallbackOrderMsg) (retVal *m
result.LogisticsStatus = 0
result.LogisticsContext = model.RiderGetOrderDeliverOther
}
globals.SugarLogger.Debugf("===========================mtps:%s", utils.Format4Output(result, false))
delivery.PullTiktokRiderInfo(result)
if result.LogisticsStatus == model.WaybillStatusCourierArrived {
result.LogisticsStatus = model.WaybillStatusDelivering

View File

@@ -151,6 +151,7 @@ func GetOrderRiderInfoToPlatform(orderId string, wayBillStatus int) {
}
func PullTiktokRiderInfo(riderInfo *mtpsapi.RiderInfo) {
globals.SugarLogger.Debugf("==================riderInfo:%s", utils.Format4Output(riderInfo, false))
switch riderInfo.LogisticsStatus {
case 5: // 呼叫骑手
riderInfo.LogisticsStatus = 0
@@ -192,6 +193,7 @@ func PullTiktokRiderInfo(riderInfo *mtpsapi.RiderInfo) {
// 呼叫骑手的时候推送发货
// 抖店由于发配送时运单id已经固定了,我们系统在重新发货,或者运单号发生改变时去推送信息时.抖店只识别第一个运单号所以在这儿修改成发单时的第一个运单号!
paramsMap := utils.Struct2Map(riderInfo, "", true)
globals.SugarLogger.Debugf("==================paramsMap:%s", utils.Format4Output(paramsMap, false))
if handler := partner.GetPurchaseOrderHandlerFromVendorID(model.VendorIDDD); handler != nil {
if err := handler.GetOrderRider("", "", paramsMap); err != nil {
globals.SugarLogger.Errorf("PullTiktokRiderInfo Err %s", err.Error())