| | |
| | | "apsClient/utils/file" |
| | | "encoding/json" |
| | | "fmt" |
| | | "github.com/jinzhu/gorm" |
| | | "github.com/mitchellh/mapstructure" |
| | | "github.com/spf13/cast" |
| | | "gorm.io/gorm" |
| | | "strings" |
| | | ) |
| | | |
| | |
| | | return nil |
| | | }) |
| | | if err != nil { |
| | | logx.Errorf(" save task message error err: %v", err.Error()) |
| | | logx.Errorf(" save task message error err: %v", err) |
| | | return err |
| | | } |
| | | } |
| | |
| | | } |
| | | 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 |
| | | } |