From f1b802a1c9644e7e7bbeb2eca5e0c42448ea4ca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Mon, 5 Aug 2024 11:00:09 +0800 Subject: [PATCH] 1 --- business/jxcallback/orderman/order_comment.go | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/business/jxcallback/orderman/order_comment.go b/business/jxcallback/orderman/order_comment.go index 968977c20..bb489b562 100644 --- a/business/jxcallback/orderman/order_comment.go +++ b/business/jxcallback/orderman/order_comment.go @@ -138,36 +138,36 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) ( weixinmsg.PushJDBadCommentToWeiXin(comment2, orderComment.Score <= JX_BAD_COMMENTS_MAX_LEVEL, order) } } else { // 修改评价,高于JX_BAD_COMMENTS_MAX_LEVEL - if orderComment.CommentCreatedAt.Sub(str2Time(comment2.Createtime)) == 0 || - orderComment.CommentCreatedAt.Sub(str2Time(comment2.Updatetime)) == 0 { - comment2 = nil // 重复 - } else { - comment2.Updatetime = utils.Time2Str(orderComment.CommentCreatedAt) - comment2.UpdatedMsg = orderComment.OriginalMsg - comment2.UpdatedScore = int(orderComment.Score) - comment2.UpdatedScorecontent = orderComment.Content - comment2.UpdatedVendertags = orderComment.TagList - comment2.Status = COMMENT_RESOLVED - comment2.VendorOrderId = orderComment.VendorOrderID2 - if comment2.Jxstoreid != "" && orderComment.Score <= JX_MIDDLE_COMMENTS_MAX_LEVEL && time.Now().Sub(orderComment.CommentCreatedAt) < MAX_REAPLY_TIME { - comment2.LastPushTime = utils.Time2Str(time.Now()) - comment2.PushNo++ + //if orderComment.CommentCreatedAt.Sub(str2Time(comment2.Createtime)) == 0 || + // orderComment.CommentCreatedAt.Sub(str2Time(comment2.Updatetime)) == 0 { + // comment2 = nil // 重复 + //} else { + comment2.Updatetime = utils.Time2Str(orderComment.CommentCreatedAt) + comment2.UpdatedMsg = orderComment.OriginalMsg + comment2.UpdatedScore = int(orderComment.Score) + comment2.UpdatedScorecontent = orderComment.Content + comment2.UpdatedVendertags = orderComment.TagList + comment2.Status = COMMENT_RESOLVED + comment2.VendorOrderId = orderComment.VendorOrderID2 + if comment2.Jxstoreid != "" && orderComment.Score <= JX_MIDDLE_COMMENTS_MAX_LEVEL && time.Now().Sub(orderComment.CommentCreatedAt) < MAX_REAPLY_TIME { + comment2.LastPushTime = utils.Time2Str(time.Now()) + comment2.PushNo++ - comment3 := *comment2 - comment3.Createtime = comment2.Updatetime - comment3.Score = comment2.UpdatedScore - comment3.Scorecontent = comment2.UpdatedScorecontent - comment3.Vendertags = comment2.UpdatedVendertags + comment3 := *comment2 + comment3.Createtime = comment2.Updatetime + comment3.Score = comment2.UpdatedScore + comment3.Scorecontent = comment2.UpdatedScorecontent + comment3.Vendertags = comment2.UpdatedVendertags - var order *model.GoodsOrder - if orderComment.VendorID == model.VendorIDMTWM && orderComment.VendorOrderID2 != "" { - order, _ = partner.CurOrderManager.LoadOrder(orderComment.VendorOrderID2, orderComment.VendorID) - } else { - order, _ = partner.CurOrderManager.LoadOrder(orderComment.VendorOrderID, orderComment.VendorID) - } - weixinmsg.PushJDBadCommentToWeiXin(&comment3, orderComment.Score <= JX_BAD_COMMENTS_MAX_LEVEL, order) + var order *model.GoodsOrder + if orderComment.VendorID == model.VendorIDMTWM && orderComment.VendorOrderID2 != "" { + order, _ = partner.CurOrderManager.LoadOrder(orderComment.VendorOrderID2, orderComment.VendorID) + } else { + order, _ = partner.CurOrderManager.LoadOrder(orderComment.VendorOrderID, orderComment.VendorID) } + weixinmsg.PushJDBadCommentToWeiXin(&comment3, orderComment.Score <= JX_BAD_COMMENTS_MAX_LEVEL, order) } + //} } if err == nil {