作者 王健

更新【公司 仓储】

... ... @@ -50,7 +50,6 @@ func (repository *CompanyRepository) Save(company *domain.Company) (*domain.Comp
&company.CompanyInfo,
&company.CreateAt,
&company.UpdateAt,
&company.DeleteAt,
),
fmt.Sprintf("INSERT INTO companies (%s) VALUES (%s) RETURNING %s", insertFieldsSnippet, insertPlaceHoldersSnippet, returningFieldsSnippet),
... ... @@ -59,7 +58,6 @@ func (repository *CompanyRepository) Save(company *domain.Company) (*domain.Comp
company.CompanyInfo,
company.CreateAt,
company.UpdateAt,
company.DeleteAt,
); err != nil {
return company, err
}
... ... @@ -70,7 +68,6 @@ func (repository *CompanyRepository) Save(company *domain.Company) (*domain.Comp
&company.CompanyInfo,
&company.CreateAt,
&company.UpdateAt,
&company.DeleteAt,
),
fmt.Sprintf("UPDATE companies SET %s WHERE company_id=? RETURNING %s", updateFieldsSnippet, returningFieldsSnippet),
... ... @@ -78,7 +75,6 @@ func (repository *CompanyRepository) Save(company *domain.Company) (*domain.Comp
company.CompanyInfo,
company.CreateAt,
company.UpdateAt,
company.DeleteAt,
company.Identify(),
); err != nil {
return company, err
... ...