diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index e7217ef57..28dc3f9ec 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -1424,6 +1424,7 @@ func (c *OrderManager) AmendMissingOrders(ctx *jxcontext.Context, vendorIDs []in vendorDate := batchItemList[0].(*tDateVendorPair) if handler, _ := partner.GetPurchaseOrderHandlerFromVendorID(vendorDate.VendorID).(partner.IPurchasePlatformStoreSkuHandler); handler != nil { orderIDs, err2 := handler.ListOrders(ctx, vendorDate.VendorOrgCode, task, vendorDate.QueryDate, vendorStoreIDMap[vendorDate.VendorID]) + globals.SugarLogger.Debugf("===========orderIDs := %s", utils.Format4Output(orderIDs, false)) if err = err2; err == nil && len(orderIDs) > 0 { var orderList []*tOrderVendorPair for _, v := range orderIDs { @@ -1438,6 +1439,7 @@ func (c *OrderManager) AmendMissingOrders(ctx *jxcontext.Context, vendorIDs []in VendorStoreID: vendorStoreID, }) } + globals.SugarLogger.Debugf("===========orderList := %s", utils.Format4Output(orderList, false)) retVal = orderList } } @@ -1483,6 +1485,7 @@ func (c *OrderManager) AmendMissingOrders(ctx *jxcontext.Context, vendorIDs []in func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { pair := batchItemList[0].(*tOrderVendorPair) if handler := partner.GetPurchaseOrderHandlerFromVendorID(pair.VendorID); handler != nil { + globals.SugarLogger.Debugf("===========orderList := %s , %s", utils.Format4Output(pair.VendorOrderID, false), pair.VendorStoreID) order, err2 := handler.GetOrder(pair.VendorOrgCode, pair.VendorOrderID, pair.VendorStoreID) if err = err2; err == nil { @@ -1491,6 +1494,8 @@ func (c *OrderManager) AmendMissingOrders(ctx *jxcontext.Context, vendorIDs []in } isDuplicated, err2 := c.SaveOrder(order, false, dao.GetDB()) + globals.SugarLogger.Debugf("===========isDuplicated := %s , %v", utils.Format4Output(isDuplicated, false), err2) + globals.SugarLogger.Debugf("===========order := %s ", utils.Format4Output(order, false)) if err2 == nil && !isDuplicated { retVal = []int{1} if order.Status == model.OrderStatusNew { diff --git a/business/partner/purchase/mtwm/order_afs.go b/business/partner/purchase/mtwm/order_afs.go index f73c39367..e38e28001 100644 --- a/business/partner/purchase/mtwm/order_afs.go +++ b/business/partner/purchase/mtwm/order_afs.go @@ -198,7 +198,9 @@ func (c *PurchaseHandler) onAfsOrderMsg(msg *mtwmapi.CallbackMsg) (retVal *mtwma refundDetail, err := mtmApi.GetOrderRefundDetail(utils.Str2Int64(order.VendorOrderID), 0) if err == nil && len(refundDetail) > 0 { for _, rd := range refundDetail { - order.TotalShopMoney = order.TotalShopMoney + jxutils.StandardPrice2Int(utils.Str2Float64(rd.RefundPartialEstimateCharge.SettleAmount)) + if rd.RefundPartialEstimateCharge.SettleAmount != "" { + order.TotalShopMoney = order.TotalShopMoney + jxutils.StandardPrice2Int(utils.Str2Float64(rd.RefundPartialEstimateCharge.SettleAmount)) + } } switch order.EarningType { case model.EarningTypePoints: // 扣点