From 6a48d9a257cb0c5a86703abbaf4be110cecba7fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 18 Jul 2024 10:00:03 +0800 Subject: [PATCH] 1 --- business/jxcallback/orderman/order_comment.go | 2 ++ business/model/dao/dao_order_sku_financial.go | 5 +++++ business/partner/purchase/mtwm/order_comment.go | 1 + 3 files changed, 8 insertions(+) diff --git a/business/jxcallback/orderman/order_comment.go b/business/jxcallback/orderman/order_comment.go index 7f1f50024..f3ccc2b6e 100644 --- a/business/jxcallback/orderman/order_comment.go +++ b/business/jxcallback/orderman/order_comment.go @@ -172,8 +172,10 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) ( if err == nil { if isNewComment { + globals.SugarLogger.Debugf("================new comment2 := %s", utils.Format4Output(comment2, false)) err = dao.CreateEntity(db, comment2) } else if comment2 != nil { + globals.SugarLogger.Debugf("================UpdateEntity comment2 := %s", utils.Format4Output(comment2, false)) _, err = dao.UpdateEntity(db, comment2) } } diff --git a/business/model/dao/dao_order_sku_financial.go b/business/model/dao/dao_order_sku_financial.go index a482dccf7..7726b7d4f 100644 --- a/business/model/dao/dao_order_sku_financial.go +++ b/business/model/dao/dao_order_sku_financial.go @@ -1,6 +1,8 @@ package dao import ( + "git.rosy.net.cn/baseapi/utils" + "git.rosy.net.cn/jx-callback/globals" "git.rosy.net.cn/jx-print/dao" "time" ) @@ -18,11 +20,14 @@ func GetBadCommentOrderId(jxStoreId int, startTime, endTime time.Time, foodNameL foodNameList, }) + globals.SugarLogger.Debugf("===========foodNameList := %s", utils.Format4Output(foodNameList, false)) commentOrder := make([]*badCommentOrder, 0, 0) if err := GetRows(GetDB(), &commentOrder, sql, sqlParams...); err != nil { + globals.SugarLogger.Debugf("===========err := %v", err) return "", err } + globals.SugarLogger.Debugf("===========commentOrder := %s", utils.Format4Output(commentOrder, false)) // 全等于的话就是目标订单 for _, v := range commentOrder { if v.Count == len(foodNameList) { diff --git a/business/partner/purchase/mtwm/order_comment.go b/business/partner/purchase/mtwm/order_comment.go index 0c9c35284..d532dddae 100644 --- a/business/partner/purchase/mtwm/order_comment.go +++ b/business/partner/purchase/mtwm/order_comment.go @@ -99,6 +99,7 @@ func (c *PurchaseHandler) RefreshComment(fromTime, toTime time.Time) (err error) } vendorOrderID, _ := dao.GetBadCommentOrderId(storeDetail.ID, startTime, endTime, foodNameList) if vendorOrderID != "" { + globals.SugarLogger.Debugf("==================vendorOrderID := %s", vendorOrderID) orderComment.VendorOrderID2 = vendorOrderID } }