From c73f22ab60452fcffe801fba938e4bdbc433e9e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 4 Aug 2022 14:27:08 +0800 Subject: [PATCH 1/2] 1 --- business/jxstore/event/event_tcp_utils.go | 4 ++-- business/jxstore/event/print_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/business/jxstore/event/event_tcp_utils.go b/business/jxstore/event/event_tcp_utils.go index 57cacf4c8..701ecb15a 100644 --- a/business/jxstore/event/event_tcp_utils.go +++ b/business/jxstore/event/event_tcp_utils.go @@ -566,8 +566,8 @@ func int2h8l8(i int64) (h, l string) { } begin8 := origin2[:8] end8 := origin2[8:] - r1, _ := strconv.ParseInt(begin8, 2, 32) - r2, _ := strconv.ParseInt(end8, 2, 32) + r1, _ := strconv.ParseInt(begin8, 2, 64) + r2, _ := strconv.ParseInt(end8, 2, 64) h = fmt.Sprintf("%x", r1) l = fmt.Sprintf("%x", r2) if len(h) < 2 { diff --git a/business/jxstore/event/print_test.go b/business/jxstore/event/print_test.go index 40a7fd605..3498f114b 100644 --- a/business/jxstore/event/print_test.go +++ b/business/jxstore/event/print_test.go @@ -17,7 +17,7 @@ func TestPrintMsg(t *testing.T) { ModelIDCULD: model.ModelIDCULD{}, PrintNo: "20220707000002", Content: "6162", - OrderNo: "1", + OrderNo: "9999999991", // 2147483648111 Status: 0, Comment: "", MsgID: "1", From efeb2ac31d80ce02196b7247a18a2eb18263e719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 4 Aug 2022 14:32:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/event/event_tcp_utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/business/jxstore/event/event_tcp_utils.go b/business/jxstore/event/event_tcp_utils.go index 701ecb15a..7ad249ffa 100644 --- a/business/jxstore/event/event_tcp_utils.go +++ b/business/jxstore/event/event_tcp_utils.go @@ -570,10 +570,10 @@ func int2h8l8(i int64) (h, l string) { r2, _ := strconv.ParseInt(end8, 2, 64) h = fmt.Sprintf("%x", r1) l = fmt.Sprintf("%x", r2) - if len(h) < 2 { + if len(h)%2 != 0 { h = "0" + h } - if len(l) < 2 { + if len(l)%2 != 0 { l = "0" + l } return h, l