From 59f6b018efaceeaa0e567e46360c8f8e339ddaa0 Mon Sep 17 00:00:00 2001 From: timerzz Date: Mon, 9 Sep 2024 17:25:56 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E5=8E=86=E5=8F=B2=E4=BB=B7=E6=A0=BC?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=95=B0=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- structs/storage/provider-article.go | 4 ++-- structs/storage/seller-article.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/structs/storage/provider-article.go b/structs/storage/provider-article.go index 6f61270..6afb73b 100644 --- a/structs/storage/provider-article.go +++ b/structs/storage/provider-article.go @@ -14,7 +14,7 @@ type ProviderArticleApi interface { BatchUpdate(articles []v2.ProviderArticle) error AutoMigrate() error FindInBatches(query *GetProviderArticleQuery, results *[]v2.ProviderArticle, f func(tx *gorm.DB, batch int) error) error - ProviderPrice(query *GetProviderArticleQuery) (history v2.ProviderPrice, err error) + ProviderPrice(query *GetProviderArticleQuery) (history []v2.ProviderPrice, err error) } type providerArticleApi struct { @@ -113,7 +113,7 @@ func (p *providerArticleApi) AutoMigrate() error { return p.db.AutoMigrate(&v2.ProviderArticle{}, &v2.ProviderPrice{}) } -func (p *providerArticleApi) ProviderPrice(query *GetProviderArticleQuery) (history v2.ProviderPrice, err error) { +func (p *providerArticleApi) ProviderPrice(query *GetProviderArticleQuery) (history []v2.ProviderPrice, err error) { err = p.db.Scopes(query.Scope).Find(&history).Error return } diff --git a/structs/storage/seller-article.go b/structs/storage/seller-article.go index cab65c5..de31fb2 100644 --- a/structs/storage/seller-article.go +++ b/structs/storage/seller-article.go @@ -13,7 +13,7 @@ type SellerArticleApi interface { Update(sellerArticle v2.SellerArticle, selects ...string) error FindInBatches(query *GetSellerArticleQuery, results *[]v2.SellerArticle, f func(tx *gorm.DB, batch int) error) error AutoMigrate() error - SellerPrice(query *GetSellerArticleQuery) (history v2.SellerPrice, err error) + SellerPrice(query *GetSellerArticleQuery) (history []v2.SellerPrice, err error) } type sellerArticleApi struct { @@ -109,7 +109,7 @@ func (p *sellerArticleApi) AutoMigrate() error { return p.db.AutoMigrate(&v2.SellerArticle{}, &v2.SellerPrice{}) } -func (p *sellerArticleApi) SellerPrice(query *GetSellerArticleQuery) (history v2.SellerPrice, err error) { +func (p *sellerArticleApi) SellerPrice(query *GetSellerArticleQuery) (history []v2.SellerPrice, err error) { err = p.db.Scopes(query.Scope).Find(&history).Error return }