Jelajahi Sumber

关机无记录数据1

bzd_lkh 1 bulan lalu
induk
melakukan
582cccbe4d
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  1. 2 0
      MqttServer/MqttClients.go

+ 2 - 0
MqttServer/MqttClients.go

@@ -188,8 +188,10 @@ func MessageDisconnected(topicName string, message []byte) {
 		r_Device.T_monitor = 0
 		if !strings.Contains(r_Device.T_model, "BW100") {
 			DeviceSensorList := Device.Read_DeviceSensor_ByTsn(r_Device.T_sn)
+			logs.Println("DeviceSensorList:", DeviceSensorList)
 			for _, v := range DeviceSensorList {
 				DeviceData_t, is := Device.RedisDeviceData_Get(r_Device.T_sn+"_Redis", v.T_id)
+				logs.Println("DeviceData_t is:", is)
 				if is {
 					Device.Add_DeviceData(r_Device.T_sn, v.T_id, DeviceData_t, true)
 					Device.RedisDeviceData_Del(r_Device.T_sn+"_Redis", v.T_id) // 清除缓存标志