1
This commit is contained in:
@@ -243,7 +243,6 @@ func EBaiSyncSkuPriceAndStatus(db *dao.DaoDB, sm *model.StoreMap, skuMap map[str
|
||||
}
|
||||
}
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("=========vsl.CustomSkuId := %s", vsl.CustomSkuId)
|
||||
_, err = ebaiApi.SkuDelete(jxcontext.AdminCtx.GetTrackInfo(), utils.Int2Str(sm.StoreID), nil, []string{vsl.CustomSkuId})
|
||||
|
||||
//err = ebaiApi.SkuOfflineOne(jxcontext.AdminCtx.GetTrackInfo(), utils.Int2Str(sm.StoreID), utils.Str2Int64(vsl.CustomSkuId), "", "")
|
||||
|
||||
@@ -176,9 +176,6 @@ func (c *OrderManager) OnOrderStatusChanged(vendorOrgCode string, orderStatus *m
|
||||
panic(r)
|
||||
}
|
||||
}()
|
||||
if orderStatus.VendorOrderID == "3901182973700720079" {
|
||||
globals.SugarLogger.Debugf("=======orderStatus := %s", utils.Format4Output(orderStatus, false))
|
||||
}
|
||||
// 有些平台(比如美团外卖),在新订单事件没有成功返回,但在重发订单消息前,订单状态转换,则不会再重发新订单事件,特殊处理一下
|
||||
if orderStatus != nil && orderStatus.Status == model.OrderStatusAccepted {
|
||||
loadOrder, err2 := c.LoadOrder(orderStatus.VendorOrderID, orderStatus.VendorID)
|
||||
@@ -196,10 +193,6 @@ func (c *OrderManager) OnOrderStatusChanged(vendorOrgCode string, orderStatus *m
|
||||
}
|
||||
|
||||
isDuplicated, order, err := c.addOrderStatus(orderStatus, db)
|
||||
if orderStatus.VendorOrderID == "3901182973700720079" {
|
||||
globals.SugarLogger.Debugf("=======isDuplicated2 := %s", utils.Format4Output(isDuplicated, false))
|
||||
globals.SugarLogger.Debugf("=======order := %s", utils.Format4Output(order, false))
|
||||
}
|
||||
if err == nil {
|
||||
dao.Commit(db, txDB)
|
||||
if orderStatus.Status == model.OrderStatusWaybillTipChanged {
|
||||
@@ -976,11 +969,6 @@ func (c *OrderManager) addOrderStatus(orderStatus *model.OrderStatus, db *dao.Da
|
||||
}
|
||||
|
||||
isDuplicated, err = addOrderOrWaybillStatus(orderStatus, db)
|
||||
if orderStatus.VendorOrderID == "3901182973700720079" {
|
||||
globals.SugarLogger.Debugf("=======order2 := %s", utils.Format4Output(orderStatus, false))
|
||||
globals.SugarLogger.Debugf("=======isDuplicated := %s", utils.Format4Output(isDuplicated, false))
|
||||
globals.SugarLogger.Debugf("=======err := %v", err)
|
||||
}
|
||||
if err == nil && !isDuplicated && (orderStatus.Status != model.OrderStatusUnknown && orderStatus.Status != model.OrderStatusMsg) {
|
||||
// todo 加这个代码的原因是,抖店运单取消会去将本地的订单状态设置为取消,跳过,不修改本地订单状态
|
||||
if orderStatus.RefVendorID == model.VendorIDDD && orderStatus.OrderType == model.OrderTypeWaybill && orderStatus.VendorStatus == utils.Int64ToStr(tiktok_api.ShipmentStatusCanceled) {
|
||||
@@ -1032,10 +1020,6 @@ func (c *OrderManager) addOrderStatus(orderStatus *model.OrderStatus, db *dao.Da
|
||||
}
|
||||
|
||||
utils.CallFuncLogError(func() error {
|
||||
if orderStatus.VendorOrderID == "3901182973700720079" {
|
||||
globals.SugarLogger.Debugf("=======order := %s", utils.Format4Output(order, false))
|
||||
globals.SugarLogger.Debugf("=======updateFields := %s", utils.Format4Output(updateFields, false))
|
||||
}
|
||||
_, err = db.Db.Update(order, updateFields...)
|
||||
return err
|
||||
}, "addOrderStatus update orderID:%s, status:%v", order.VendorOrderID, orderStatus)
|
||||
|
||||
@@ -341,9 +341,6 @@ func getSkuWeight(product map[string]interface{}) (weight int) {
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) onOrderMsg(msg *mtwmapi.CallbackMsg) (response *mtwmapi.CallbackResponse) {
|
||||
if msg.FormData.Get("order_id") == "3901182973700720079" {
|
||||
globals.SugarLogger.Debugf("=======msg := %s", utils.Format4Output(msg, false))
|
||||
}
|
||||
var err error
|
||||
if c.isAfsMsg(msg) {
|
||||
response = c.OnAfsOrderMsg(msg)
|
||||
@@ -353,9 +350,6 @@ func (c *PurchaseHandler) onOrderMsg(msg *mtwmapi.CallbackMsg) (response *mtwmap
|
||||
if partner.CurOrderManager.GetStatusDuplicatedCount(status) > 1 { // 重复消息推送校验,允许推送两次
|
||||
return nil
|
||||
}
|
||||
if msg.FormData.Get("order_id") == "3901182973700720079" {
|
||||
globals.SugarLogger.Debugf("=======status := %s", utils.Format4Output(status, false))
|
||||
}
|
||||
if msg.Cmd == mtwmapi.MsgTypeNewOrder {
|
||||
order, orderMap, err2 := c.getOrder(msg.AppID, GetOrderIDFromMsg(msg), GetVendorStoreIDFromMsg(msg))
|
||||
if err = err2; err == nil {
|
||||
|
||||
Reference in New Issue
Block a user