zhangqian
2023-10-21 578b74f9de4b96e88e2fddb726c7c6f78162b033
nsq/msg_handler.go
@@ -305,7 +305,12 @@
      record.Method != oldPlcRecord.Method ||
      record.Address != oldPlcRecord.Address ||
      record.Detail != oldPlcRecord.Detail {
      err = model.NewDevicePlcSearch().SetDeviceId(msg.ID).Save(&record)
      oldPlcRecord.Port = record.Port
      oldPlcRecord.Method = record.Method
      oldPlcRecord.Address = record.Address
      oldPlcRecord.Detail = record.Detail
      err = model.NewDevicePlcSearch().Save(oldPlcRecord)
   }
   if err != nil {
      return err