This commit is contained in:
邹宗楠
2023-10-25 09:51:06 +08:00
parent 211513b137
commit 74339b920d
3 changed files with 6 additions and 6 deletions

View File

@@ -189,6 +189,8 @@ func (c *OrderManager) OnOrderStatusChanged(vendorOrgCode string, orderStatus *m
}
isDuplicated, order, err := c.addOrderStatus(orderStatus, db)
globals.SugarLogger.Debugf("==========isDuplicated := %s", utils.Format4Output(isDuplicated, false))
globals.SugarLogger.Debugf("==========orderStatus := %s", utils.Format4Output(orderStatus, false))
if err == nil {
dao.Commit(db, txDB)
if orderStatus.Status == model.OrderStatusWaybillTipChanged {
@@ -989,6 +991,8 @@ 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

@@ -496,12 +496,6 @@ func (s *DefScheduler) OnOrderStatusChanged(order *model.GoodsOrder, status *mod
}
msghub.OnKeyOrderStatusChanged(savedOrderInfo.order)
}
// 京西云打印机打印数据-如果门店使用京西打印机才使用如下代码块
//store, _ := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, order.VendorID, order.VendorOrgCode)
//if err == nil && store.PrinterVendorID == model.VendorIDJxprint {
// netprinter.PrintOrderByOrder(jxcontext.AdminCtx, order, model.PrintTypeOrder, nil)
//}
}
}
return err

View File

@@ -4,6 +4,7 @@ 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"
@@ -58,6 +59,7 @@ 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, "")