fix
zhangqian
2023-11-03 a9fa2fe7c72279cecc916bb63cee154cdea67b54
service/device_plc.go
@@ -19,7 +19,7 @@
}
func (slf DevicePlcService) GetDevicePlc() (*model.DevicePlc, int) {
   DevicePlc, err := model.NewDevicePlcSearch().SetDeviceId(conf.Conf.System.DeviceId).First()
   DevicePlc, err := model.NewDevicePlcSearch().SetDeviceId(conf.Conf.CurrentDeviceID).First()
   if err == gorm.ErrRecordNotFound {
      return &model.DevicePlc{
         DeviceID:   "",
@@ -70,7 +70,7 @@
   if record.ID == 0 {
      err = model.NewDevicePlcSearch().Create(&record)
   } else {
      err = model.NewDevicePlcSearch().SetId(record.ID).Save(&record)
      err = model.NewDevicePlcSearch().Save(&record)
   }
   if err != nil {