- enable auto reply order comment
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
|||||||
|
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
"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/jxutils/weixinmsg"
|
||||||
"git.rosy.net.cn/jx-callback/business/model"
|
"git.rosy.net.cn/jx-callback/business/model"
|
||||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||||
@@ -165,10 +166,14 @@ func (c *OrderManager) replyOrderComment(orderComment *model.OrderComment) (err
|
|||||||
globals.SugarLogger.Debugf("replyOrderComment orderID:%s, delaySeconds:%d, content:%s", orderComment.VendorOrderID, delaySeconds, content)
|
globals.SugarLogger.Debugf("replyOrderComment orderID:%s, delaySeconds:%d, content:%s", orderComment.VendorOrderID, delaySeconds, content)
|
||||||
time.AfterFunc(time.Duration(delaySeconds)*time.Second, func() {
|
time.AfterFunc(time.Duration(delaySeconds)*time.Second, func() {
|
||||||
if globals.ReallySendWeixinMsg {
|
if globals.ReallySendWeixinMsg {
|
||||||
// err = partner.GetPurchasePlatformFromVendorID(orderComment.VendorID).ReplyOrderComment(nil, orderComment, content)
|
if handler := partner.GetPurchasePlatformFromVendorID(orderComment.VendorID); handler != nil {
|
||||||
|
err = handler.ReplyOrderComment(jxcontext.AdminCtx, orderComment, content)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
globals.SugarLogger.Debugf("replyOrderComment orderID:%s, error:%v", orderComment.VendorOrderID, err)
|
globals.SugarLogger.Debugf("replyOrderComment orderID:%s, error:%v", orderComment.VendorOrderID, err)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
globals.SugarLogger.Warnf("replyOrderComment can not find handler orderID:%s", orderComment.VendorOrderID)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user