baishaojie пре 1 недеља
родитељ
комит
bbcd6e891c
3 измењених фајлова са 4 додато и 3 уклоњено
  1. 3 3
      conf/app-test.ini
  2. 1 0
      http/handle/api/mqtt.go
  3. BIN
      tmr-watch.exe

+ 3 - 3
conf/app-test.ini

@@ -52,8 +52,8 @@ User = root
 #Password = root
 #Password = kepaiteng!QAZ
 #Host = 8.130.17.8:3306
-Host = 192.168.1.93:3326
-#Host = 127.0.0.1:3316
+#Host = 192.168.1.93:3326
+Host = 127.0.0.1:3316
 #Name = root
 Password = root
 #Password = root
@@ -77,7 +77,7 @@ Password = root
 #Name = tmrgo
 #Password = kepaiteng!QAZ
 #Host = 222.73.129.15:31306
-Name = yq2
+Name = tmrwatch2
 TablePrefix =
 
 ShowXormlog = false

+ 1 - 0
http/handle/api/mqtt.go

@@ -311,6 +311,7 @@ WHERE
 	if len(dataList) > 0 {
 		b, _ := json.Marshal(dataList)
 		pushStr = fmt.Sprintf(pushStr, setting.YynserverSetting.FarmId, len(dataList), string(b))
+		fmt.Println(pushStr)
 		token := c.Publish(pubTopic, 2, false, pushStr)
 
 		fmt.Println("publish msg: ", pushStr, token.Error())