From aeddf01cbdea915f51e8630e98b4d75d5633ec87 Mon Sep 17 00:00:00 2001 From: gazebo Date: Tue, 12 Mar 2019 21:11:18 +0800 Subject: [PATCH] - fk --- business/jxcallback/orderman/oder_comment.go | 2 +- business/partner/purchase/jd/order_legacy_comment.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/business/jxcallback/orderman/oder_comment.go b/business/jxcallback/orderman/oder_comment.go index 913f2abda..6be3a53fc 100644 --- a/business/jxcallback/orderman/oder_comment.go +++ b/business/jxcallback/orderman/oder_comment.go @@ -74,7 +74,7 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) ( comment2 := &legacymodel.JxBadComments{ OrderId: orderComment.VendorOrderID, } - err := dao.GetEntity(db, &comment2, model.FieldVendoOrderID) + err := dao.GetEntity(db, comment2, model.FieldVendoOrderID) if err == nil || dao.IsNoRowsError(err) { isNewComment := false if dao.IsNoRowsError(err) { diff --git a/business/partner/purchase/jd/order_legacy_comment.go b/business/partner/purchase/jd/order_legacy_comment.go index cf5ce97a2..3a4b630c2 100644 --- a/business/partner/purchase/jd/order_legacy_comment.go +++ b/business/partner/purchase/jd/order_legacy_comment.go @@ -71,7 +71,8 @@ var ( func (c *PurchaseHandler) onOrderComment(msg *jdapi.CallbackOrderMsg) (err error) { globals.SugarLogger.Debugf("onOrderComment orderID:%s", msg.BillID) - go func() error { + + utils.CallFuncAsync(func() { c.onOrderComment2(msg) intOrderID := utils.Str2Int64(msg.BillID) result, err := api.JdAPI.GetCommentByOrderId(intOrderID) @@ -141,8 +142,7 @@ func (c *PurchaseHandler) onOrderComment(msg *jdapi.CallbackOrderMsg) (err error if err != nil { globals.SugarLogger.Warnf("onOrderComment orderID:%s failed with error:%v", msg.BillID, err) } - return err - }() + }) return err }