diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 166eccc78..7aaf0db85 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "git.rosy.net.cn/baseapi/platformapi/tao_vegetable" + "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api" "math" "strings" "time" @@ -947,6 +948,11 @@ func (c *OrderManager) addOrderStatus(orderStatus *model.OrderStatus, db *dao.Da } isDuplicated, err = addOrderOrWaybillStatus(orderStatus, db) if err == nil && !isDuplicated && (orderStatus.Status != model.OrderStatusUnknown && orderStatus.Status != model.OrderStatusMsg) { + // todo 加这个代码的原因是,抖店运单取消会去将本地的订单状态设置为取消,跳过,不修改本地订单状态 + if orderStatus.RefVendorID == model.VendorIDDD && orderStatus.OrderType == model.OrderTypeWaybill && orderStatus.VendorStatus == tiktok_api.TiktokLogisticsCANCELDELIVERY { + return isDuplicated, order, err + } + order = &model.GoodsOrder{ VendorOrderID: orderStatus.VendorOrderID, VendorID: orderStatus.VendorID, @@ -991,8 +997,6 @@ func (c *OrderManager) addOrderStatus(orderStatus *model.OrderStatus, db *dao.Da } } utils.CallFuncLogError(func() error { - globals.SugarLogger.Debugf("=========================CallFuncLogError := %s", utils.Format4Output(orderStatus, 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) diff --git a/business/partner/purchase/tiktok_store/waybill.go b/business/partner/purchase/tiktok_store/waybill.go index 9fa73a38a..ab7592b04 100644 --- a/business/partner/purchase/tiktok_store/waybill.go +++ b/business/partner/purchase/tiktok_store/waybill.go @@ -4,7 +4,6 @@ import ( "errors" "fmt" instantShopping_getDeliveryListByOrderId_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/instantShopping_getDeliveryListByOrderId/response" - "git.rosy.net.cn/jx-callback/globals" "time" superm_getStoreAutoCallRiderInfo_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_getStoreAutoCallRiderInfo/response" @@ -59,7 +58,6 @@ func (c *PurchaseHandler) onWaybillMsg(tag, orderId string, data interface{}) *t UpdatedAt: time.Now(), }, } - globals.SugarLogger.Debugf("============data := %s", utils.Format4Output(status, false)) err = partner.CurOrderManager.OnOrderStatusChanged(localOrder.VendorOrgCode, status) } return tiktok_api.Err2CallbackResponse(err, "")