fix
zhangqian
2023-11-25 cb7e30bb64945dfbd8288a20156f09c97a052075
service/device_plc.go
@@ -19,7 +19,7 @@
}
func (slf DevicePlcService) GetDevicePlc() (*model.DevicePlc, int) {
   DevicePlc, err := model.NewDevicePlcSearch().SetDeviceId(conf.Conf.CurrentDeviceID).First()
   devicePlc, err := model.NewDevicePlcSearch().SetDeviceId(conf.Conf.CurrentDeviceID).First()
   if err == gorm.ErrRecordNotFound {
      logx.Errorf("GetDevicePlc failed:%v", err)
      return &model.DevicePlc{
@@ -41,8 +41,11 @@
      logx.Errorf("GetDevicePlc failed:%v", err)
      return nil, ecode.DBErr
   }
   if len(devicePlc.Details) == 0 {
      return nil, ecode.PlcAddressError
   }
   return DevicePlc, ecode.OK
   return devicePlc, ecode.OK
}
func (slf DevicePlcService) GetDeviceChannelAmount() (int, error) {