From fb63c0d831fb43c78cdc56db17e4358358372d4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 18 Jul 2023 10:13:42 +0800 Subject: [PATCH] 1 --- business/jxcallback/orderman/order_comment.go | 4 ++++ business/partner/purchase/mtwm/order_comment.go | 2 ++ 2 files changed, 6 insertions(+) diff --git a/business/jxcallback/orderman/order_comment.go b/business/jxcallback/orderman/order_comment.go index 3b578fa3c..958f98591 100644 --- a/business/jxcallback/orderman/order_comment.go +++ b/business/jxcallback/orderman/order_comment.go @@ -80,6 +80,7 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) ( if err == nil || dao.IsNoRowsError(err) { isNewComment := false if dao.IsNoRowsError(err) { + globals.SugarLogger.Debugf("========dao.IsNoRowsError= :%s", utils.Format4Output(orderComment, false)) err = nil isNewComment = true if orderComment.IsReplied == 0 && time.Now().Sub(orderComment.CommentCreatedAt) < time.Duration(orderComment.ModifyDuration)*time.Hour { @@ -157,6 +158,9 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) ( } } } + globals.SugarLogger.Debugf("========comment2= :%s", utils.Format4Output(comment2, false)) + globals.SugarLogger.Debugf("========isNewComment= :%s", utils.Format4Output(isNewComment, false)) + if err == nil { if isNewComment { err = dao.CreateEntity(db, comment2) diff --git a/business/partner/purchase/mtwm/order_comment.go b/business/partner/purchase/mtwm/order_comment.go index d585b479a..4824df771 100644 --- a/business/partner/purchase/mtwm/order_comment.go +++ b/business/partner/purchase/mtwm/order_comment.go @@ -29,6 +29,7 @@ func (c *PurchaseHandler) StartRefreshComment() { } func (c *PurchaseHandler) refreshCommentOnce() { + globals.SugarLogger.Debugf("%s", utils.Format4Output(time.Now(), false)) c.RefreshComment(time.Now().Add(-RefreshCommentTime), time.Now()) utils.AfterFuncWithRecover(RefreshCommentTimeInterval, func() { c.refreshCommentOnce() @@ -55,6 +56,7 @@ func (c *PurchaseHandler) RefreshComment(fromTime, toTime time.Time) (err error) storeID := batchItemList[0].(int) storeDetail, _ := dao.GetStoreDetail(dao.GetDB(), storeID, model.VendorIDMTWM, "") commentList, err2 := getAPI(storeDetail.VendorOrgCode, storeID, storeDetail.VendorStoreID).CommentQuery(storeDetail.VendorStoreID, startDateStr, endDateStr, 0, 0, mtwmapi.CommentReplyStatusNotReplied) + globals.SugarLogger.Debugf("========commentList= :%s", utils.Format4Output(commentList, false)) var orderCommentList []*model.OrderComment if err = err2; err != nil { return nil, err