diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index 605cae1b9..ed3f8d28e 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -372,6 +372,18 @@ func HandleTcpMessages() { printMsgChan <- printMsg printMsg.Status = printMsgAlreadyLoad dao.UpdateEntity(db, printMsg, "Status") + for { + select { + case obj, _ := <-printMsgChan: + if _, ok := obj.(*model.PrintMsg); !ok { + if data, ok2 := obj.(string); ok2 { + changePrintMsg(data) + break + } + continue + } + } + } } } } @@ -383,7 +395,6 @@ func doPrint2(printMsgChan chan interface{}) (err error) { for { select { case obj, _ := <-printMsgChan: - fmt.Println("qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", utils.Format4Output(obj, true)) printMsg, ok := obj.(*model.PrintMsg) if ok { var ( @@ -431,10 +442,6 @@ func doPrint2(printMsgChan chan interface{}) (err error) { } } } - } else { - data, _ := <-printMsgChan - dataStr := data.(string) - changePrintMsg(dataStr) } } }