From d8f1c33b936e0ce48c6747cdd1b0f41bbe6d6275 Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 29 Apr 2019 14:44:34 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8D=E5=8F=91=E9=80=81?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=B6=88=E6=81=AF=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/msghub/msghub.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/business/msghub/msghub.go b/business/msghub/msghub.go index 39144e0f3..bb5c61951 100644 --- a/business/msghub/msghub.go +++ b/business/msghub/msghub.go @@ -68,7 +68,7 @@ func routinueFunc() { delete(channelMap[registerMsg.StoreID], registerMsg.Chan2Listen) close(registerMsg.Chan2Close) case ServerMsgNewOrder, ServerMsgKeyOrderStatusChanged: - globals.SugarLogger.Debugf("msghub routinueFunc, msg:%s", utils.Format4Output(msg, false)) + globals.SugarLogger.Debugf("msghub routinueFunc, msg:%s", utils.Format4Output(msg, true)) utils.CallFuncAsync(func() { for chan2Send := range channelMap[msg.StoreID] { chan2Send <- msg @@ -138,7 +138,7 @@ func GetMsg(ctx *jxcontext.Context, storeID int, lastOrderTime time.Time, lastOr case msg2, ok := <-chan2Listen: timer.Stop() if ok { - msg.MsgData = msg2.MsgData + msg = msg2 } case <-timer.C: unregisterChan(storeID, chan2Listen) @@ -152,7 +152,7 @@ func GetMsg(ctx *jxcontext.Context, storeID int, lastOrderTime time.Time, lastOr } func OnNewOrder(order *model.GoodsOrder) { - globals.SugarLogger.Debugf("msghub OnNewOrder, order:%s", utils.Format4Output(order, false)) + globals.SugarLogger.Debugf("msghub OnNewOrder, order:%s", utils.Format4Output(order, true)) utils.CallFuncAsync(func() { msgChan <- &ServerMsg{ Type: ServerMsgNewOrder, @@ -168,7 +168,7 @@ func OnNewOrder(order *model.GoodsOrder) { } func OnKeyOrderStatusChanged(order *model.GoodsOrder) { - globals.SugarLogger.Debugf("msghub OnKeyOrderStatusChanged, order:%s", utils.Format4Output(order, false)) + globals.SugarLogger.Debugf("msghub OnKeyOrderStatusChanged, order:%s", utils.Format4Output(order, true)) utils.CallFuncAsync(func() { msgChan <- &ServerMsg{ Type: ServerMsgKeyOrderStatusChanged,