diff --git a/business/jxcallback/orderman/oder_comment.go b/business/jxcallback/orderman/oder_comment.go index 958ff4496..dca05378a 100644 --- a/business/jxcallback/orderman/oder_comment.go +++ b/business/jxcallback/orderman/oder_comment.go @@ -6,6 +6,7 @@ import ( "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/jxutils" + "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext" "git.rosy.net.cn/jx-callback/business/jxutils/weixinmsg" "git.rosy.net.cn/jx-callback/business/model" "git.rosy.net.cn/jx-callback/business/model/dao" @@ -165,9 +166,13 @@ func (c *OrderManager) replyOrderComment(orderComment *model.OrderComment) (err globals.SugarLogger.Debugf("replyOrderComment orderID:%s, delaySeconds:%d, content:%s", orderComment.VendorOrderID, delaySeconds, content) time.AfterFunc(time.Duration(delaySeconds)*time.Second, func() { if globals.ReallySendWeixinMsg { - // err = partner.GetPurchasePlatformFromVendorID(orderComment.VendorID).ReplyOrderComment(nil, orderComment, content) - if err != nil { - globals.SugarLogger.Debugf("replyOrderComment orderID:%s, error:%v", orderComment.VendorOrderID, err) + if handler := partner.GetPurchasePlatformFromVendorID(orderComment.VendorID); handler != nil { + err = handler.ReplyOrderComment(jxcontext.AdminCtx, orderComment, content) + if err != nil { + globals.SugarLogger.Debugf("replyOrderComment orderID:%s, error:%v", orderComment.VendorOrderID, err) + } + } else { + globals.SugarLogger.Warnf("replyOrderComment can not find handler orderID:%s", orderComment.VendorOrderID) } } })