From 3ca8f1290232818ca2720fa3a9a736ca1d52a1a8 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期六, 07 十月 2023 20:42:32 +0800
Subject: [PATCH] gorm版本v2改成v1

---
 nsq/msg_handler.go |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/nsq/msg_handler.go b/nsq/msg_handler.go
index 175f3e7..86c8df2 100644
--- a/nsq/msg_handler.go
+++ b/nsq/msg_handler.go
@@ -11,9 +11,9 @@
 	"apsClient/utils/file"
 	"encoding/json"
 	"fmt"
+	"github.com/jinzhu/gorm"
 	"github.com/mitchellh/mapstructure"
 	"github.com/spf13/cast"
-	"gorm.io/gorm"
 	"strings"
 )
 
@@ -170,8 +170,8 @@
 	}
 	detail, err := json.Marshal(record.Details)
 	record.Detail = string(detail)
-	record.Id = 1
-	err = model.NewDevicePlcSearch().SetId(record.Id).Save(&record)
+	record.ID = 1
+	err = model.NewDevicePlcSearch().SetId(record.ID).Save(&record)
 	if err != nil {
 		return err
 	}

--
Gitblit v1.8.0