1
This commit is contained in:
@@ -433,7 +433,6 @@ func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee
|
||||
}
|
||||
|
||||
func (c *DeliveryHandler) CancelWaybill(bill *model.Waybill, cancelReasonID int, cancelReason string) (err error) {
|
||||
globals.SugarLogger.Debugf("========cancelReason :=%s %s", bill.VendorOrderID, cancelReason)
|
||||
cancelReasonID = mtpsapi.CancelReasonMerchantOther
|
||||
if cancelReason == "" {
|
||||
cancelReason = "顾客主动取消"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package ebai
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/ebaiapi"
|
||||
@@ -65,6 +67,17 @@ func (c *PurchaseHandler) onWaybillMsg(msg *ebaiapi.CallbackMsg) (retVal *ebaiap
|
||||
}
|
||||
}
|
||||
})
|
||||
} else if order.VendorStatus == ebaiapi.WaybillStatusSelfDelivery {
|
||||
result1, err1 := api.EbaiAPI.OrderGet(order.VendorOrderID)
|
||||
if err1 == nil {
|
||||
address := utils.Interface2String(result1["user"].(map[string]interface{})["address"])
|
||||
localOrder, _ := partner.CurOrderManager.LoadOrder(order.VendorOrderID, model.VendorIDEBAI)
|
||||
localOrder.ConsigneeAddress = address
|
||||
dao.UpdateEntity(dao.GetDB(), localOrder, "ConsigneeAddress")
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("饿了么转自送解密用户配送地址,查询平台订单时错误:%v", err1)
|
||||
}
|
||||
|
||||
}
|
||||
return api.EbaiAPI.Err2CallbackResponse(msg.Cmd, partner.CurOrderManager.OnWaybillStatusChanged(order), order.VendorStatus)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user