1
This commit is contained in:
@@ -115,10 +115,6 @@ func (c *OrderManager) OnOrderAdjust(order *model.GoodsOrder, orderStatus *model
|
||||
order.Status = model.OrderStatusAccepted
|
||||
}
|
||||
isDuplicated, err := addOrderOrWaybillStatus(orderStatus, db)
|
||||
if order.VendorOrderID == "4062150144186637882" {
|
||||
globals.SugarLogger.Debugf("=====isDuplicated----- %s", utils.Format4Output(isDuplicated, false))
|
||||
globals.SugarLogger.Debugf("=====err----- %v", err)
|
||||
}
|
||||
if err == nil && !isDuplicated {
|
||||
err = utils.CallFuncLogError(func() error {
|
||||
_, err = db.Db.Raw("DELETE FROM order_sku WHERE vendor_order_id = ? AND vendor_id = ?", order.VendorOrderID, order.VendorID).Exec()
|
||||
@@ -159,11 +155,6 @@ func (c *OrderManager) OnOrderAdjust(order *model.GoodsOrder, orderStatus *model
|
||||
order.TotalShopMoney = order2.TotalShopMoney
|
||||
}
|
||||
isDuplicated, err = c.SaveOrder(order, true, db)
|
||||
if order.VendorOrderID == "4062150144186637882" {
|
||||
globals.SugarLogger.Debugf("=====isDuplicated222----- %s", utils.Format4Output(isDuplicated, false))
|
||||
globals.SugarLogger.Debugf("=====isDuorderplicated222----- %s", utils.Format4Output(order, false))
|
||||
globals.SugarLogger.Debugf("=====err----- %v", err)
|
||||
}
|
||||
}
|
||||
if err == nil {
|
||||
dao.Commit(db, txDB)
|
||||
@@ -423,9 +414,6 @@ func (c *OrderManager) SaveOrder(order *model.GoodsOrder, isAdjust bool, db *dao
|
||||
}
|
||||
_, _, err = db.Db.ReadOrCreate(originalOrder, "VendorOrderID", "VendorID")
|
||||
if created {
|
||||
if order.VendorOrderID == "4062150144186637882" {
|
||||
globals.SugarLogger.Debugf("=====err----- %s", utils.Format4Output(order.Skus, false))
|
||||
}
|
||||
if err = dao.CreateMultiEntities(db, order.Skus); err != nil {
|
||||
baseapi.SugarLogger.Warnf("saveOrder orderID:%s, save order_sku failed with error:%v", order.VendorOrderID, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user