This commit is contained in:
邹宗楠
2023-10-25 10:26:36 +08:00
parent 74339b920d
commit 89cf2f43aa
2 changed files with 6 additions and 4 deletions

View File

@@ -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)

View File

@@ -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, "")