From 02a84fb6fb2a39bfe7fc5cf6c0137bbf231b17fe Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 09 十一月 2023 14:14:17 +0800
Subject: [PATCH] 设备列表返回是否设置工艺参数字段

---
 model/device_plc.go |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/model/device_plc.go b/model/device_plc.go
index c68b1f3..a098e81 100644
--- a/model/device_plc.go
+++ b/model/device_plc.go
@@ -127,7 +127,7 @@
 func (slf *DevicePlcSearch) Save(record *DevicePlc) error {
 	var db = slf.build()
 
-	if err := db.Omit("CreatedAt").Updates(record).Error; err != nil {
+	if err := db.Omit("CreatedAt").Save(record).Error; err != nil {
 		return fmt.Errorf("save err: %v, record: %+v", err, record)
 	}
 

--
Gitblit v1.8.0