1
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user