This commit is contained in:
邹宗楠
2022-12-30 10:00:55 +08:00
parent 9abe9a3a2c
commit 8a4c145048

View File

@@ -59,13 +59,13 @@ func (t *TcpClient) handleConn(c net.Conn) {
if strings.Contains(string(buffer[0:n]), "print_no") { // 清理缓存
globals.SugarLogger.Debugf("=========buffer %s", string(buffer[0:n]))
param := struct {
PrintNo string `json:"print_no"`
PrintNo json.Number `json:"print_no"`
}{}
if err := json.Unmarshal(buffer[0:n], &param); err != nil {
c.Write([]byte(err.Error()))
return
}
t.buildMsgMap(param.PrintNo)
t.buildMsgMap(param.PrintNo.String())
c.Write([]byte("ok"))
return
}