1
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.rosy.net.cn/baseapi/platformapi/tao_vegetable"
|
"git.rosy.net.cn/baseapi/platformapi/tao_vegetable"
|
||||||
|
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api"
|
||||||
"math"
|
"math"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@@ -947,6 +948,11 @@ func (c *OrderManager) addOrderStatus(orderStatus *model.OrderStatus, db *dao.Da
|
|||||||
}
|
}
|
||||||
isDuplicated, err = addOrderOrWaybillStatus(orderStatus, db)
|
isDuplicated, err = addOrderOrWaybillStatus(orderStatus, db)
|
||||||
if err == nil && !isDuplicated && (orderStatus.Status != model.OrderStatusUnknown && orderStatus.Status != model.OrderStatusMsg) {
|
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{
|
order = &model.GoodsOrder{
|
||||||
VendorOrderID: orderStatus.VendorOrderID,
|
VendorOrderID: orderStatus.VendorOrderID,
|
||||||
VendorID: orderStatus.VendorID,
|
VendorID: orderStatus.VendorID,
|
||||||
@@ -991,8 +997,6 @@ func (c *OrderManager) addOrderStatus(orderStatus *model.OrderStatus, db *dao.Da
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
utils.CallFuncLogError(func() error {
|
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...)
|
_, err = db.Db.Update(order, updateFields...)
|
||||||
return err
|
return err
|
||||||
}, "addOrderStatus update orderID:%s, status:%v", order.VendorOrderID, orderStatus)
|
}, "addOrderStatus update orderID:%s, status:%v", order.VendorOrderID, orderStatus)
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
instantShopping_getDeliveryListByOrderId_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/instantShopping_getDeliveryListByOrderId/response"
|
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"
|
"time"
|
||||||
|
|
||||||
superm_getStoreAutoCallRiderInfo_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_getStoreAutoCallRiderInfo/response"
|
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(),
|
UpdatedAt: time.Now(),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debugf("============data := %s", utils.Format4Output(status, false))
|
|
||||||
err = partner.CurOrderManager.OnOrderStatusChanged(localOrder.VendorOrgCode, status)
|
err = partner.CurOrderManager.OnOrderStatusChanged(localOrder.VendorOrgCode, status)
|
||||||
}
|
}
|
||||||
return tiktok_api.Err2CallbackResponse(err, "")
|
return tiktok_api.Err2CallbackResponse(err, "")
|
||||||
|
|||||||
Reference in New Issue
Block a user