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 }