From 462278b702e7037359a4e16d6b7eabd9ee19bcb8 Mon Sep 17 00:00:00 2001 From: 18209 Date: Wed, 22 Apr 2026 17:39:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=A1=E5=8F=B7=E7=81=AF=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- consumers/consumerESraw2http.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/consumers/consumerESraw2http.go b/consumers/consumerESraw2http.go index b3e74b4..0314fd6 100644 --- a/consumers/consumerESraw2http.go +++ b/consumers/consumerESraw2http.go @@ -100,8 +100,13 @@ func SendPostRequest(url string, postThings models.PostThings) error { // 构建请求体 onlineValue := 1 + startorstopstate := "start" if postThings.Online == 3 { onlineValue = 2 + startorstopstate = "stop" + } else if postThings.Online == 2 { + startorstopstate = "stop" + onlineValue = 1 } postBody := map[string]interface{}{ "equipcode": postThings.EquipCode, @@ -111,7 +116,7 @@ func SendPostRequest(url string, postThings models.PostThings) error { "online": onlineValue, "currentstate": 1, "led": 1, - "startorstopstate": "Start", + "startorstopstate": startorstopstate, "threshold": 10.0, "thresholdchangerate": 10.0, "updatetime": formattedTime,