From bb9183f92e1e6b71ac34d47ac68d976dea1cfec4 Mon Sep 17 00:00:00 2001 From: 18209 Date: Mon, 20 Apr 2026 10:37:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E7=9A=84=E8=A7=84=E5=88=99?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=86=EF=BC=9A=201=E6=98=AF=E5=9C=A8?= =?UTF-8?q?=E7=BA=BF=E5=B9=B6=E4=B8=94=E5=BC=80=E5=90=AF=202=E6=98=AF?= =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E4=B8=94=E5=85=B3=E9=97=AD=E7=8A=B6=E6=80=81?= =?UTF-8?q?=203=E6=98=AF=E7=A6=BB=E7=BA=BF=20=E8=BF=9B=E7=A8=8B=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=88=B0=E4=BA=86=E8=AE=BE=E5=A4=87=E7=9A=84=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E9=83=BD=E6=98=AF2=EF=BC=8C=E4=BD=86=E6=98=AF?= =?UTF-8?q?=E9=9A=86=E6=B1=9F=E9=82=A3=E8=BE=B91-=E5=9C=A8=E7=BA=BF?= =?UTF-8?q?=E3=80=812-=E7=A6=BB=E7=BA=BF=E3=80=813-=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E7=A1=AE=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- consumers/consumerESraw2http.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/consumers/consumerESraw2http.go b/consumers/consumerESraw2http.go index 13f8e22..262675c 100644 --- a/consumers/consumerESraw2http.go +++ b/consumers/consumerESraw2http.go @@ -99,12 +99,16 @@ func SendPostRequest(url string, postThings models.PostThings) error { formattedTime := time.Now().Format("2006-01-02 15:04:05") // 构建请求体 + onlineValue := 1 + if postThings.Online == 3 { + onlineValue = 2 + } postBody := map[string]interface{}{ "equipcode": postThings.EquipCode, "lng": postThings.Lng, "lat": postThings.Lat, "status": 1, - "online": postThings.Online, + "online": onlineValue, "currentstate": 1, "led": 1, "startorstopstate": "Start",