From 5a9e2e97e78a05209a57a75a75678d67c32c58d5 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期六, 21 十月 2023 11:25:20 +0800 Subject: [PATCH] debug over --- service/device_plc.go | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/service/device_plc.go b/service/device_plc.go index 90c3e51..fc5fadc 100644 --- a/service/device_plc.go +++ b/service/device_plc.go @@ -1,6 +1,7 @@ package service import ( + "apsClient/conf" "apsClient/model" "apsClient/model/request" "apsClient/pkg/ecode" @@ -18,7 +19,7 @@ } func (slf DevicePlcService) GetDevicePlc() (*model.DevicePlc, int) { - DevicePlc, err := model.NewDevicePlcSearch().SetOrder("id desc").First() + DevicePlc, err := model.NewDevicePlcSearch().SetDeviceId(conf.Conf.System.DeviceId).First() if err == gorm.ErrRecordNotFound { return &model.DevicePlc{ Brand: "", -- Gitblit v1.8.0