diff --git a/business/jxcallback/orderman/order_comment.go b/business/jxcallback/orderman/order_comment.go index 02151b26e..10707ffdb 100644 --- a/business/jxcallback/orderman/order_comment.go +++ b/business/jxcallback/orderman/order_comment.go @@ -2,6 +2,9 @@ package orderman import ( "encoding/json" + "fmt" + "git.rosy.net.cn/baseapi/platformapi/dingdingapi" + "git.rosy.net.cn/jx-callback/business/jxutils/ddmsg" "math/rand" "time" @@ -77,15 +80,20 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) ( OrderId: orderComment.VendorOrderID, } err = dao.GetEntity(db, comment2, "OrderId") + if orderComment.StoreID == 669247 { + ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "自动好评回复err:", fmt.Sprintf("%v", err)) + } if err == nil || dao.IsNoRowsError(err) { isNewComment := false if dao.IsNoRowsError(err) { err = nil isNewComment = true + if orderComment.StoreID == 669247 { + ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "自动好评回复orderCommentList:", utils.Format4Output(orderCommentList[0], false)) + } if orderComment.IsReplied == 0 && time.Now().Sub(orderComment.CommentCreatedAt) < time.Duration(orderComment.ModifyDuration)*time.Hour { if storeDetail, err2 := dao.GetStoreDetail(db, orderComment.StoreID, orderComment.VendorID, ""); err2 == nil { - if storeDetail.AutoReplyType == model.AutoReplyAll || - orderComment.Score > JX_BAD_COMMENTS_MAX_LEVEL && storeDetail.AutoReplyType == model.AutoReplyGoodComment { + if storeDetail.AutoReplyType == model.AutoReplyAll || orderComment.Score > JX_BAD_COMMENTS_MAX_LEVEL && storeDetail.AutoReplyType == model.AutoReplyGoodComment { c.replyOrderComment(storeDetail.VendorOrgCode, orderComment) } } diff --git a/business/partner/purchase/mtwm/order_comment.go b/business/partner/purchase/mtwm/order_comment.go index 299d5c8ce..6f31507d2 100644 --- a/business/partner/purchase/mtwm/order_comment.go +++ b/business/partner/purchase/mtwm/order_comment.go @@ -1,6 +1,8 @@ package mtwm import ( + "git.rosy.net.cn/baseapi/platformapi/dingdingapi" + "git.rosy.net.cn/jx-callback/business/jxutils/ddmsg" "strings" "time" @@ -53,9 +55,13 @@ func (c *PurchaseHandler) RefreshComment(fromTime, toTime time.Time) (err error) task := tasksch.NewParallelTask("mtwm RefreshComment", nil, jxcontext.AdminCtx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { storeID := batchItemList[0].(int) + storeDetail, _ := dao.GetStoreDetail(dao.GetDB(), storeID, model.VendorIDMTWM, "") commentList, _ := getAPI(storeDetail.VendorOrgCode, storeID, storeDetail.VendorStoreID).CommentQuery(storeDetail.VendorStoreID, startDateStr, endDateStr, 0, 0, mtwmapi.CommentReplyStatusNotReplied) var orderCommentList []*model.OrderComment + if storeID == 669247 { + ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "自动好评回复:", utils.Int2Str(669247)+":"+utils.Int2Str(len(commentList))) + } if len(commentList) == model.NO || commentList == nil { return nil, nil }