This commit is contained in:
邹宗楠
2023-05-30 16:20:39 +08:00
parent 7d848cde39
commit 833dcddced
2 changed files with 5 additions and 9 deletions

View File

@@ -740,8 +740,6 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
}
}
globals.SugarLogger.Debugf("bill===============%s", utils.Format4Output(bill, false))
globals.SugarLogger.Debugf("order===============%s", utils.Format4Output(bill, false))
if err := orderman.ResetCreateWaybillFee(nil, order, bill); err != nil {
globals.SugarLogger.Errorf("ResetCreateWaybillFee err : %v", err)
}

View File

@@ -85,16 +85,14 @@ func (c *DeliveryHandler) OnWaybillExcept(msg *mtpsapi.CallbackOrderExceptionMsg
}
func (c *DeliveryHandler) onWaybillMsg(msg *mtpsapi.CallbackOrderMsg) (retVal *mtpsapi.CallbackResponse) {
globals.SugarLogger.Debugf("=======msg %s", utils.Format4Output(msg, false))
order := c.callbackMsg2Waybill(msg)
// 多次取消,只处理第一次
if msg.Status == mtpsapi.OrderStatusCanceled {
bill, err := partner.CurOrderManager.LoadWaybill(msg.MtPeisongID, model.VendorIDMTPS)
if err != nil {
return mtpsapi.Err2CallbackResponse(err, fmt.Sprintf("%s", "获取订单状态错误"))
}
if bill.Status == model.OrderStatusCanceled {
return mtpsapi.SuccessResponse
orderStatus, _ := orderman.FixedOrderManager.GetWayBillStatusList(msg.OrderID, msg.MtPeisongID, model.VendorIDMTPS)
for _, v := range orderStatus {
if v.VendorStatus == "99" {
return mtpsapi.SuccessResponse
}
}
}