From f2076410211d826c27aa74effdccb2ab9d88c6bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 16 Dec 2022 15:10:27 +0800 Subject: [PATCH] 1 --- business/jxstore/event/event_tcp.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index dd3a175de..e8258d1b8 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -161,11 +161,10 @@ func (t *TcpClient) HandleTcpMessages(printNo string) { if !t.isExistMsg(printNo) { return } - timeNow := time.Now() go func() { for { - if timeNow.Second()%2 != 0 { + if time.Now().Second()%2 != 0 { continue } select { @@ -174,6 +173,7 @@ func (t *TcpClient) HandleTcpMessages(printNo string) { return default: //一直读? + timeNow := time.Now() timeStart := time.Date(timeNow.Year(), timeNow.Month(), timeNow.Day(), 0, 0, 0, 0, timeNow.Location()) timeEnd := time.Date(timeNow.Year(), timeNow.Month(), timeNow.Day(), 23, 59, 59, 0, timeNow.Location()) prints, _ := dao.GetPrintMsgs(db, printNo, []int{printMsgWait, printMsgAlreadyLoad}, timeStart, timeEnd, offset, pageSize)