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) {
|
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
|
cancelReasonID = mtpsapi.CancelReasonMerchantOther
|
||||||
if cancelReason == "" {
|
if cancelReason == "" {
|
||||||
cancelReason = "顾客主动取消"
|
cancelReason = "顾客主动取消"
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package ebai
|
package ebai
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/platformapi/ebaiapi"
|
"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)
|
return api.EbaiAPI.Err2CallbackResponse(msg.Cmd, partner.CurOrderManager.OnWaybillStatusChanged(order), order.VendorStatus)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user