...
|
...
|
@@ -42,9 +42,6 @@ func (repository *EmployeeProductRecordRepository) Save(employeeProductRecord *d |
|
|
"version",
|
|
|
"product_record_info",
|
|
|
"product_worker",
|
|
|
"approve_status",
|
|
|
"approve_at",
|
|
|
"approve_user",
|
|
|
}
|
|
|
insertFieldsSnippet := sqlbuilder.SqlFieldsSnippet(sqlbuilder.RemoveSqlFields(sqlBuildFields, "employee_product_record_id", "deleted_at"))
|
|
|
insertPlaceHoldersSnippet := sqlbuilder.SqlPlaceHoldersSnippet(sqlbuilder.RemoveSqlFields(sqlBuildFields, "employee_product_record_id", "deleted_at"))
|
...
|
...
|
@@ -70,9 +67,6 @@ func (repository *EmployeeProductRecordRepository) Save(employeeProductRecord *d |
|
|
&employeeProductRecord.Version,
|
|
|
&employeeProductRecord.ProductRecordInfo,
|
|
|
&employeeProductRecord.ProductWorker,
|
|
|
&employeeProductRecord.ApproveStatus,
|
|
|
&employeeProductRecord.ApproveAt,
|
|
|
&employeeProductRecord.ApproveUser,
|
|
|
),
|
|
|
fmt.Sprintf("INSERT INTO manufacture.employee_product_record (%s) VALUES (%s) RETURNING %s", insertFieldsSnippet, insertPlaceHoldersSnippet, returningFieldsSnippet),
|
|
|
//employeeProductRecord.EmployeeProductRecordId,
|
...
|
...
|
@@ -90,9 +84,6 @@ func (repository *EmployeeProductRecordRepository) Save(employeeProductRecord *d |
|
|
employeeProductRecord.Version,
|
|
|
employeeProductRecord.ProductRecordInfo,
|
|
|
employeeProductRecord.ProductWorker,
|
|
|
employeeProductRecord.ApproveStatus,
|
|
|
employeeProductRecord.ApproveAt,
|
|
|
employeeProductRecord.ApproveUser,
|
|
|
); err != nil {
|
|
|
return employeeProductRecord, err
|
|
|
}
|
...
|
...
|
@@ -114,9 +105,6 @@ func (repository *EmployeeProductRecordRepository) Save(employeeProductRecord *d |
|
|
&employeeProductRecord.Version,
|
|
|
&employeeProductRecord.ProductRecordInfo,
|
|
|
&employeeProductRecord.ProductWorker,
|
|
|
&employeeProductRecord.ApproveStatus,
|
|
|
&employeeProductRecord.ApproveAt,
|
|
|
&employeeProductRecord.ApproveUser,
|
|
|
),
|
|
|
fmt.Sprintf("UPDATE manufacture.employee_product_record SET %s WHERE employee_product_record_id=? RETURNING %s", updateFieldsSnippet, returningFieldsSnippet),
|
|
|
//employeeProductRecord.EmployeeProductRecordId,
|
...
|
...
|
@@ -134,9 +122,6 @@ func (repository *EmployeeProductRecordRepository) Save(employeeProductRecord *d |
|
|
employeeProductRecord.Version,
|
|
|
employeeProductRecord.ProductRecordInfo,
|
|
|
employeeProductRecord.ProductWorker,
|
|
|
employeeProductRecord.ApproveStatus,
|
|
|
employeeProductRecord.ApproveAt,
|
|
|
employeeProductRecord.ApproveUser,
|
|
|
employeeProductRecord.Identify(),
|
|
|
); err != nil {
|
|
|
return employeeProductRecord, err
|
...
|
...
|
|