...
|
...
|
@@ -35,7 +35,7 @@ func (repository *DeviceCollectionRepository) Save(deviceCollection *domain.Devi |
|
|
"startup_status",
|
|
|
"com_status",
|
|
|
"values",
|
|
|
"count",
|
|
|
"product_count",
|
|
|
"latest_update_time",
|
|
|
}
|
|
|
insertFieldsSnippet := sqlbuilder.SqlFieldsSnippet(sqlBuildFields)
|
...
|
...
|
@@ -61,7 +61,7 @@ func (repository *DeviceCollectionRepository) Save(deviceCollection *domain.Devi |
|
|
&deviceCollection.StartupStatus,
|
|
|
&deviceCollection.ComStatus,
|
|
|
&deviceCollection.Values,
|
|
|
&deviceCollection.Count,
|
|
|
&deviceCollection.ProductCount,
|
|
|
&deviceCollection.LatestUpdateTime,
|
|
|
),
|
|
|
fmt.Sprintf("INSERT INTO manufacture.device_collections (%s) VALUES (%s) RETURNING %s", insertFieldsSnippet, insertPlaceHoldersSnippet, returningFieldsSnippet),
|
...
|
...
|
@@ -73,7 +73,7 @@ func (repository *DeviceCollectionRepository) Save(deviceCollection *domain.Devi |
|
|
deviceCollection.StartupStatus,
|
|
|
deviceCollection.ComStatus,
|
|
|
deviceCollection.Values,
|
|
|
deviceCollection.Count,
|
|
|
deviceCollection.ProductCount,
|
|
|
deviceCollection.LatestUpdateTime,
|
|
|
); err != nil {
|
|
|
return deviceCollection, err
|
...
|
...
|
@@ -89,7 +89,7 @@ func (repository *DeviceCollectionRepository) Save(deviceCollection *domain.Devi |
|
|
&deviceCollection.StartupStatus,
|
|
|
&deviceCollection.ComStatus,
|
|
|
&deviceCollection.Values,
|
|
|
&deviceCollection.Count,
|
|
|
&deviceCollection.ProductCount,
|
|
|
&deviceCollection.LatestUpdateTime,
|
|
|
),
|
|
|
fmt.Sprintf("UPDATE manufacture.device_collections SET %s WHERE device_collection_id=? RETURNING %s", updateFieldsSnippet, returningFieldsSnippet),
|
...
|
...
|
@@ -101,7 +101,7 @@ func (repository *DeviceCollectionRepository) Save(deviceCollection *domain.Devi |
|
|
deviceCollection.StartupStatus,
|
|
|
deviceCollection.ComStatus,
|
|
|
deviceCollection.Values,
|
|
|
deviceCollection.Count,
|
|
|
deviceCollection.ProductCount,
|
|
|
deviceCollection.LatestUpdateTime,
|
|
|
deviceCollection.Identify(),
|
|
|
); err != nil {
|
...
|
...
|
|