From 4ee80fafea1e5e57c495114348aa6d1a09a38ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 30 Dec 2022 10:10:25 +0800 Subject: [PATCH] 1 --- business/jxstore/event/event_tcp.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index 6b786befc..f0ef656a9 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -56,16 +56,15 @@ func (t *TcpClient) handleConn(c net.Conn) { //看是心跳还是打印回调 data := hex.EncodeToString(buffer[:n]) - if strings.Contains(string(buffer[0:n]), "print_no") { // 清理缓存 - globals.SugarLogger.Debugf("=========buffer %s", string(buffer[0:n])) + if strings.Contains(string(buffer[0:n]), "print_no_clear") { // 清理缓存 param := struct { - PrintNo json.Number `json:"print_no"` + PrintNoClear json.Number `json:"print_no_clear"` }{} if err := json.Unmarshal(buffer[0:n], ¶m); err != nil { c.Write([]byte(err.Error())) return } - t.buildMsgMap(param.PrintNo.String()) + t.buildMsgMap(param.PrintNoClear.String()) c.Write([]byte("ok")) return }